source-sdk-2013
source-sdk-2013 copied to clipboard
[TF2] Remove knockback-attribute-specific animation overrides for CTFScattergun
Closes https://github.com/ValveSoftware/Source-1-Games/issues/3959 and allows for usage of the attribute in custom weapons without animation breakage.
NOTE: This MUST be accompanied by items_game.txt changes to reintroduce the animations via animation_replacement:
prefabs.weapon_force_a_nature.visuals.animation_replacement
diff --git a/tf/scripts/items/items_game.txt b/tf/scripts/items/items_game.txt
index eae0400..cc9a2bd 100644
--- a/tf/scripts/items/items_game.txt
+++ b/tf/scripts/items/items_game.txt
@@ -17977,6 +17977,17 @@
"animation_replacement"
{
+ "ACT_VM_IDLE" "ACT_ITEM2_VM_IDLE"
+ "ACT_VM_DRAW" "ACT_ITEM2_VM_DRAW"
+ "ACT_VM_HOLSTER" "ACT_ITEM2_VM_HOLSTER"
+ "ACT_VM_PULLBACK" "ACT_ITEM2_VM_PULLBACK"
+ "ACT_VM_PRIMARYATTACK" "ACT_ITEM2_VM_PRIMARYATTACK"
+ "ACT_VM_SECONDARYATTACK" "ACT_ITEM2_VM_SECONDARYATTACK"
+ "ACT_VM_RELOAD" "ACT_ITEM2_VM_RELOAD"
+ "ACT_VM_DRYFIRE" "ACT_ITEM2_VM_DRYFIRE"
+ "ACT_VM_IDLE_TO_LOWERED" "ACT_ITEM2_VM_IDLE_TO_LOWERED"
+ "ACT_VM_IDLE_LOWERED" "ACT_ITEM2_VM_IDLE_LOWERED"
+ "ACT_VM_LOWERED_TO_IDLE" "ACT_ITEM2_VM_LOWERED_TO_IDLE"
"ACT_PRIMARY_VM_INSPECT_START" "ACT_ITEM2_VM_INSPECT_START"
"ACT_PRIMARY_VM_INSPECT_IDLE" "ACT_ITEM2_VM_INSPECT_IDLE"
"ACT_PRIMARY_VM_INSPECT_END" "ACT_ITEM2_VM_INSPECT_END"
I would also remove
virtual bool SendWeaponAnim( int iActivity );
from src/game/shared/tf/tf_weapon_shotgun.h to prevent any compile errors
I would also remove
virtual bool SendWeaponAnim( int iActivity );from src/game/shared/tf/tf_weapon_shotgun.h to prevent any compile errors
Nice catch.