Source-1-Games icon indicating copy to clipboard operation
Source-1-Games copied to clipboard

[TF2] Activity remap tables cause animation issues for ACT_MP_FALLING_STOMP

Open FlaminSarge opened this issue 3 years ago • 1 comments

The following notes address all the issues that can occur during stock gameplay. Naturally, with server modifications, even more of these remaps may be incorrect/missing, but that's outside the scope of this ticket. There are potentially also other activities that have similar issues with activity remap tables, but those are also outside the scope of this ticket.

Context:

  • ACT_MP_FALLING_STOMP is an activity that gets set in CTFPlayerAnimState::HandleJumping() when a player has a Z velocity under -580 and CTFPlayerShared::CanFallStomp() returns true (among other requirements).
    • CTFPlayerShared::CanFallStomp() returns true if the player has TF_COND_ROCKETPACK (e.g. from the Thermal Thruster's ability) or the attribute boots_falling_stomp (e.g. from the Mantreads)
  • s_acttableMelee remaps ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_MELEE.
    • This remap table is used for most non-all-class melee weapons.
  • s_acttablePrimary remaps ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_PRIMARY.
    • This remap table is used for all Pyro flamethrowers and most of the Soldier rocket launchers.
  • s_acttablePrimary2 does not remap ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_PRIMARY.
    • This remap table is used for, among other things, the Cow Mangler.
  • s_acttableMeleeAllclass does not remap ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_MELEE.
    • This remap table is used for most all-class melee weapons, as well as the Hot Hand.
  • s_acttableItem4 does not remap ACT_MP_FALLING_STOMP to anything.
    • This remap table is used for, among other things, the Thermal Thruster.
  • In soldier_animations.mdl, the sequences primary_fall_stomp_A and primary_fall_stomp_B are both assigned activity ACT_MP_FALLING_STOMP_PRIMARY
  • In soldier_animations.mdl, the sequence melee_fall_stomp is assigned activity ACT_MP_FALLING_STOMP_MELEE
  • In pyro_animations.mdl, the sequence stomp_ITEM4 is assigned activity ACT_MP_FALLING_STOMP

Issues:

  1. As a Soldier with the Mantreads equipped and the Cow Mangler as the active weapon, activating the conditions to trigger ACT_MP_FALLING_STOMP results in the character ref-posing for the duration of the activity, due to s_acttablePrimary2 missing the remap to ACT_MP_FALLING_STOMP_PRIMARY. None of the Soldier's sequences are assigned ACT_MP_FALLING_STOMP, so the ref-pose occurs.
  2. As a Soldier with the Mantreads and any all-class melee weapon (e.g. the Ham Shank) as the active weapon, activating the conditions to trigger ACT_MP_FALLING_STOMP results in the character ref-posing for the duration of the activity, due to s_acttableMeleeAllclass missing the remap to ACT_MP_FALLING_STOMP_MELEE. None of the Soldier's sequences are assigned ACT_MP_FALLING_STOMP, so the ref-pose occurs. Note that this does not occur for non-all-class melee items, as the remap exists for those.
  3. As a Pyro with the Thermal Thruster, activating the conditions to trigger ACT_MP_FALLING_STOMP (e.g. using the Thermal Thruster to gain TF_COND_ROCKETPACK) and then switching to the Pyro's primary weapon (e.g. any Flamethrower) results in the character ref-posing for the duration of the activity, due to s_acttablePrimary remapping it to ACT_MP_FALLING_STOMP_PRIMARY. None of the Pyro's sequences are assigned ACT_MP_FALLING_STOMP_PRIMARY, so the ref-pose occurs.
  4. As a Pyro with the Thermal Thruster, activating the conditions to trigger ACT_MP_FALLING_STOMP (e.g. using the Thermal Thruster to gain TF_COND_ROCKETPACK) and then switching to the Pyro's melee weapon (excluding all-class melee weapons and the Hot Hand) results in the character ref-posing for the duration of the activity, due to s_acttableMelee remapping it to ACT_MP_FALLING_STOMP_MELEE. None of the Pyro's sequences are assigned ACT_MP_FALLING_STOMP_MELEE, so the ref-pose occurs. Note that this does not occur for all-class Melee items or the Hot Hand, as it is missing the remap.
  5. Separately, the Soldier's sequence melee_fall_stomp seems to be using a Rocket Launcher animation, instead of an appropriate melee animation.

Fixes:

  1. s_acttablePrimary2 should contain the remap for ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_PRIMARY
  2. s_acttableMeleeAllclass should contain the remap for ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_MELEE
  3. pyro_animations.mdl should contain a duplicate sequence of e.g. airwalk_PRIMARY that is assigned the activity ACT_MP_FALLING_STOMP_PRIMARY; no other sequences seem to fit the feature, so a regular airwalk animation during this activity will suffice.
    • Note that a duplicate is necessary because a sequence may only have one activity assigned to it.
  4. pyro_animations.mdl should change the activity assigned to the sequence stomp_ITEM4 from ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_MELEE. This animation works passably for melee weapons (in addition to its intended use with the Thermal Thruster). The alternate option is to duplicate airwalk_MELEE for this case.
    • As a part of this, s_acttableItem4 should gain a remap from ACT_MP_FALLING_STOMP to ACT_MP_FALLING_STOMP_MELEE so that the Thermal Thruster doesn't break with the activity reassignment.
    • Potentially, both soldier_animations.mdl and pyro_animations.mdl should contain a fallback sequence assigned to ACT_MP_FALLING_STOMP so that if a remap doesn't exist for a given item, the ref-pose can be avoided. A duplicate of any of the airwalk- or stomp-related sequences should suffice.
  5. The Soldier melee_fall_stomp animation should probably be reworked in some way.

FlaminSarge avatar Aug 21 '22 13:08 FlaminSarge

More animations fixes! nice:)

condor00fr avatar Aug 21 '22 14:08 condor00fr