[TF2] Fix Demoman using the wrong animations for the Half-Zatoichi in the Loadout screen and other UI contexts - #2006
Open
Piogre wants to merge 1 commit into
Open
Conversation
The half-zatoichi has special code in CTFKatana::GetActivityWeaponRole() to check if the player holding it is a demoman and if so use the ITEM1 animslot instead of the default melee animations. The playermodelpanel never calls this when determining the animslot for an equipped item, so the half-zatoichi uses the wrong animation on demoman in the loadout screen and other places (instead using default melee animations). This adds a check for this (the only weapon that does such a thing)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In-game, the Demoman uses the "ITEM1" animations (the two-handed animations made for the Eyelander) when holding the Half-Zatoichi. This is distinct from the Soldier, who uses his regular melee animations for it.
However, the Loadout screen and other UI contexts that display the player model (the lower-left HUD, the Scoreboard, the class-select screen) do not use these alternate animations because the code that drives them does not call the code for the katana itself that overrides the animation for Demoman.
This PR adds a check for the katana to the playermodelpanel that drives these UI components, to make the Half-Zatoichi use the correct animations for Demoman. This does not affect the animations used for the Soldier, nor any other Demoman weapon.
Fixes ValveSoftware/Source-1-Games#1971