Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,9 @@ void OpenContain::processDamageToContained(Real percentDamage)
if( !object->isEffectivelyDead() && killContained )
object->kill(); // in case we are carrying flame proof troops we have been asked to kill

if ( object->isEffectivelyDead() )
// TheSuperHackers @bugfix mreza0100 23/07/2026 A destroyed occupant cannot remove itself

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change the comment for the GeneralsX pattern? thanks!
// GeneralsX @keyword author DD/MM/YYYY A meaningful description for this change.

Details: https://github.com/fbraz3/GeneralsX/blob/main/CONTRIBUTING.md

// while the contain list is temporarily detached. Do not restore a pending dangling pointer.
if ( object->isEffectivelyDead() || object->isDestroyed() )
{
onRemoving( object );
object->onRemovedFrom( getObject() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,9 @@ void OpenContain::processDamageToContained(Real percentDamage)
if( !object->isEffectivelyDead() && killContained )
object->kill(); // in case we are carrying flame proof troops we have been asked to kill

if ( object->isEffectivelyDead() )
// TheSuperHackers @bugfix mreza0100 23/07/2026 A destroyed occupant cannot remove itself

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

// while the contain list is temporarily detached. Do not restore a pending dangling pointer.
if ( object->isEffectivelyDead() || object->isDestroyed() )
{
onRemoving( object );
object->onRemovedFrom( getObject() );
Expand Down
5 changes: 5 additions & 0 deletions docs/WORKLOG/2026-07-DIARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# July 2026

## 23/07/2026
### Prevent Stale Occupants After Contained Damage
- Removed destroyed occupants before restoring the temporarily detached contain list, preventing deferred deletion from leaving dangling rider pointers in transports and garrisons.
- Applied the same fix to Generals and Zero Hour while preserving the retail-compatible CRC path.

## 17/07/2026
### Fix Non-Deterministic Math in WWMath Matrix Classes
- Traced the cross-platform desync at frame 100 to the `TrainCabUngarrisonable` object's translation matrix diverging between macOS (ARM64) and Linux (x86_64).
Expand Down
Loading