Skip to content

Commit 5ba1741

Browse files
authored
bugfix(module): GLA Battle Bus can no longer be subdued indefinitely (#1604)
1 parent e8ef120 commit 5ba1741

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,11 @@ void ActiveBody::attemptDamage( DamageInfo *damageInfo )
492492
if( !canBeSubdued() )
493493
return;
494494

495+
// TheSuperHackers @bugfix Stubbjax 20/09/2025 The isSubdued() function now directly checks status instead
496+
// of health to prevent indefinite subdue status when internally shifting health across the threshold.
495497
Bool wasSubdued = isSubdued();
496498
internalAddSubdualDamage(amount);
497-
Bool nowSubdued = isSubdued();
499+
Bool nowSubdued = m_maxHealth <= m_currentSubdualDamage;
498500
alreadyHandled = TRUE;
499501
allowModifier = FALSE;
500502

@@ -1313,7 +1315,11 @@ void ActiveBody::onSubdualChange( Bool isNowSubdued )
13131315
//-------------------------------------------------------------------------------------------------
13141316
Bool ActiveBody::isSubdued() const
13151317
{
1318+
#if RETAIL_COMPATIBLE_CRC
13161319
return m_maxHealth <= m_currentSubdualDamage;
1320+
#else
1321+
return getObject()->isDisabledByType(DISABLED_SUBDUED);
1322+
#endif
13171323
}
13181324

13191325
//-------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)