ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
650 stars 76 forks source link

[TF2] Modernize Force-a-Nature's animation setup to decouple it from set_scattergun_has_knockback #3959

Open FlaminSarge opened 2 years ago

FlaminSarge commented 2 years ago

The FaN currently gets its viewmodel animation set from some hardcoded logic in CTFScatterGun::SendWeaponAnim, which checks the attribute set_scattergun_has_knockback to determine whether to use the special animations. By extension, any scattergun with that attribute attempts to use those animations, and any FaN without that attribute has its animations revert to default scattergun animations. The Soda Popper does not use this hardcoded method and instead overrides animations in the item schema. The FaN should be updated to use that method instead, and the hardcoded behavior should be removed.

Changes required:

kisak-valve commented 2 years ago

Hello @FlaminSarge, can you clarify if there's a functional problem that would be resolved by this hypothetical refactor?

FlaminSarge commented 2 years ago

In stock gameplay I believe not; in modded gameplay I believe the nonstandard animation setup causes issues when attempting to put set_scattergun_has_knockback on e.g. custom scatterguns/scattergun models. Unsure how to tag this as Feature Request, as it's probably closer to that than a bug report.