source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] Remove knockback-attribute-specific animation overrides for CTFScattergun

Open FlaminSarge opened this issue 10 months ago • 2 comments

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"

FlaminSarge avatar Feb 21 '25 01:02 FlaminSarge

I would also remove virtual bool SendWeaponAnim( int iActivity ); from src/game/shared/tf/tf_weapon_shotgun.h to prevent any compile errors

Bitl avatar Feb 22 '25 01:02 Bitl

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.

FlaminSarge avatar Feb 22 '25 07:02 FlaminSarge