Skip to content

Commit 410c19d

Browse files
committed
bugfix: Prevent barrel animation from resuming after weapon status transition when underpowered
1 parent e8b36a1 commit 410c19d

File tree

2 files changed

+16
-0
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object
  • Generals/Code/GameEngine/Source/GameLogic/Object

2 files changed

+16
-0
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4186,7 +4186,15 @@ void Object::adjustModelConditionForWeaponStatus()
41864186
if (newStatus == READY_TO_FIRE && conditionToSet == WSF_NONE && testStatus( OBJECT_STATUS_IS_ATTACKING ) &&
41874187
(testStatus( OBJECT_STATUS_IS_AIMING_WEAPON ) || testStatus( OBJECT_STATUS_IS_FIRING_WEAPON )))
41884188
{
4189+
// TheSuperHackers @bugfix bobtista 11/11/2025 Don't resume firing animation if underpowered.
4190+
#if !RETAIL_COMPATIBLE_CRC
4191+
if ( !( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) )
4192+
{
4193+
conditionToSet = WSF_BETWEEN;
4194+
}
4195+
#else
41894196
conditionToSet = WSF_BETWEEN;
4197+
#endif
41904198
}
41914199

41924200
}

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4751,7 +4751,15 @@ void Object::adjustModelConditionForWeaponStatus()
47514751
if (newStatus == READY_TO_FIRE && conditionToSet == WSF_NONE && testStatus( OBJECT_STATUS_IS_ATTACKING ) &&
47524752
(testStatus( OBJECT_STATUS_IS_AIMING_WEAPON ) || testStatus( OBJECT_STATUS_IS_FIRING_WEAPON )))
47534753
{
4754+
// TheSuperHackers @bugfix bobtista 11/11/2025 Don't resume firing animation if underpowered.
4755+
#if !RETAIL_COMPATIBLE_CRC
4756+
if ( !( isKindOf( KINDOF_POWERED ) && isDisabledByType( DISABLED_UNDERPOWERED ) ) )
4757+
{
4758+
conditionToSet = WSF_BETWEEN;
4759+
}
4760+
#else
47544761
conditionToSet = WSF_BETWEEN;
4762+
#endif
47554763
}
47564764

47574765
}

0 commit comments

Comments
 (0)