File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior
Generals/Code/GameEngine/Source/GameLogic/Object/Behavior Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ void InstantDeathBehavior::onDie( const DamageInfo *damageInfo )
124124 if (!isDieApplicable (damageInfo))
125125 return ;
126126
127+ #if RETAIL_COMPATIBLE_CRC
127128 AIUpdateInterface* ai = getObject ()->getAIUpdateInterface ();
128129 if (ai)
129130 {
@@ -132,6 +133,7 @@ void InstantDeathBehavior::onDie( const DamageInfo *damageInfo )
132133 return ;
133134 ai->markAsDead ();
134135 }
136+ #endif
135137
136138 const InstantDeathBehaviorModuleData* d = getInstantDeathBehaviorModuleData ();
137139
@@ -170,6 +172,19 @@ void InstantDeathBehavior::onDie( const DamageInfo *damageInfo )
170172 }
171173 }
172174
175+ #if !RETAIL_COMPATIBLE_CRC
176+ // TheSuperHackers @bugfix Stubbjax 21/07/2026 Allow multiple InstantDeathBehaviors to be processed.
177+ // Multiple FXListDie, CreateObjectDie and FireWeaponWhenDeadBehavior modules are already supported.
178+ AIUpdateInterface* ai = getObject ()->getAIUpdateInterface ();
179+ if (ai)
180+ {
181+ // has another AI already handled us. (hopefully another InstantDeathBehavior)
182+ if (ai->isAiInDeadState ())
183+ return ;
184+ ai->markAsDead ();
185+ }
186+ #endif
187+
173188 TheGameLogic->destroyObject (getObject ());
174189}
175190
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ void InstantDeathBehavior::onDie( const DamageInfo *damageInfo )
124124 if (!isDieApplicable (damageInfo))
125125 return ;
126126
127+ #if RETAIL_COMPATIBLE_CRC
127128 AIUpdateInterface* ai = getObject ()->getAIUpdateInterface ();
128129 if (ai)
129130 {
@@ -132,6 +133,7 @@ void InstantDeathBehavior::onDie( const DamageInfo *damageInfo )
132133 return ;
133134 ai->markAsDead ();
134135 }
136+ #endif
135137
136138 const InstantDeathBehaviorModuleData* d = getInstantDeathBehaviorModuleData ();
137139
@@ -170,6 +172,19 @@ void InstantDeathBehavior::onDie( const DamageInfo *damageInfo )
170172 }
171173 }
172174
175+ #if !RETAIL_COMPATIBLE_CRC
176+ // TheSuperHackers @bugfix Stubbjax 21/07/2026 Allow multiple InstantDeathBehaviors to be processed.
177+ // Multiple FXListDie, CreateObjectDie and FireWeaponWhenDeadBehavior modules are already supported.
178+ AIUpdateInterface* ai = getObject ()->getAIUpdateInterface ();
179+ if (ai)
180+ {
181+ // has another AI already handled us. (hopefully another InstantDeathBehavior)
182+ if (ai->isAiInDeadState ())
183+ return ;
184+ ai->markAsDead ();
185+ }
186+ #endif
187+
173188 TheGameLogic->destroyObject (getObject ());
174189}
175190
You can’t perform that action at this time.
0 commit comments