Skip to content

[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
ValveSoftware:masterfrom
Piogre:loadout-katana
Open

[TF2] Fix Demoman using the wrong animations for the Half-Zatoichi in the Loadout screen and other UI contexts#2006
Piogre wants to merge 1 commit into
ValveSoftware:masterfrom
Piogre:loadout-katana

Conversation

@Piogre

@Piogre Piogre commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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.

loadoutbefore loadoutafter hudbefore hudafter scoreboardbefore scoreboardafter classbefore classafter

Fixes ValveSoftware/Source-1-Games#1971

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TF2] Half-Zatoichi held incorrectly by Demoman in loadout screen.

1 participant