Skip to content

bugfix(saveload): Transfer the assault transport new member flags - #3148

Draft
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/assault-transport-new-member-xfer
Draft

bugfix(saveload): Transfer the assault transport new member flags#3148
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/assault-transport-new-member-xfer

Conversation

@bobtista

Copy link
Copy Markdown

AssaultTransportAIUpdate keeps three parallel arrays for its members, and xfer writes only two:

for( int i = 0; i < m_currentMembers; i++ )
{
    xfer->xferObjectID( &(m_memberIDs[ i ]) );
    xfer->xferBool( &(m_memberHealing[ i ]) );
}

m_newMember marks a member that boarded after the attack order, and members carrying it are exempt from being ordered out to fight. Losing it means every member loads as an established one and is sent out on the next update. m_newOccupantsAreNewMembers is missing for the same reason, and because it is only set back to TRUE at the end of an update, a passenger already aboard but not yet in the member list is added as established on the frame the save is loaded.

Now both travel with the members they describe, from version 2.

Measured by forcing a value at save time, then reading both flags back on load, with the member count as a control:

version saved loaded
1 flags 11111111, occupants 1 flags 00000000, occupants 0
2 flags 11111111, occupants 1 flags 11111111, occupants 1

The member count round trips at 8 in both rows, so the record is written and read either way; version 1 is byte for byte the old behaviour, which is what keeps existing saves readable.

Todo:

  • A save and load restores the new member flags
  • A version 1 save loads exactly as it did before the change
  • Replicate to Generals

@bobtista bobtista added Bug Something is not working right, typically is user facing Saveload Is Saveload/Xfer related labels Aug 14, 2026
@bobtista bobtista self-assigned this Aug 14, 2026
@bobtista bobtista added the Minor Severity: Minor < Major < Critical < Blocker label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Saveload Is Saveload/Xfer related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assault transport members that boarded after the attack order are sent out to fight after a load

1 participant