bugfix(behavior): Do not fire weapons via the InstantDeathBehavior module while under construction - #3002
Merged
xezon merged 1 commit intoJul 22, 2026
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/InstantDeathBehavior.cpp | Adds the under-construction weapon suppression to the Generals behavior implementation. |
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/InstantDeathBehavior.cpp | Mirrors the under-construction weapon suppression in the Zero Hour behavior implementation. |
Reviews (2): Last reviewed commit: "bugfix: Do not fire weapons via the Inst..." | Re-trigger Greptile
xezon
reviewed
Jul 22, 2026
xezon
approved these changes
Jul 22, 2026
… under construction
Stubbjax
force-pushed
the
prevent-instant-death-behavior-weapons-under-construction
branch
from
July 22, 2026 17:33
e284b39 to
906e1d5
Compare
Stubbjax
deleted the
prevent-instant-death-behavior-weapons-under-construction
branch
July 28, 2026 13:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change prevents weapons from being fired via the
InstantDeathBehaviormodule if theOBJECT_STATUS_UNDER_CONSTRUCTIONstatus is set.This behaviour is already inherent to the
FireWeaponWhenDeadBehaviormodule, and behaviour is now consistent between both modules as a result.Retail data relies on this inherent condition - note
ChinaPowerPlantdoes not fire its death weapon when destroyed/cancelled while under construction, despite lacking anExemptStatus = UNDER_CONSTRUCTIONfield:However, when utilising the
InstantDeathBehaviormodule, this inherent condition no longer applies and the weapon is fired when destroyed/cancelled while under construction:This deviation between behaviours is not visible nor intuitive. An alternative approach would be to remove the inherent condition entirely from both modules and rely on the data-driven
ExemptStatus. However, this would break retail data and likely cause unnecessary additional work for modders; there is unlikely to ever be a situation where a scaffold should fire a weapon upon destruction/cancellation.