Skip to content

Commshare: store the new leader's team, not player ID, after the leader leaves - #5943

Open
moss-orbit-9f339e wants to merge 1 commit into
ZeroK-RTS:masterfrom
moss-orbit-9f339e:pr/commshare-leader-team
Open

moss-orbit-9f339e wants to merge 1 commit into
ZeroK-RTS:masterfrom
moss-orbit-9f339e:pr/commshare-leader-team

Conversation

@moss-orbit-9f339e

@moss-orbit-9f339e moss-orbit-9f339e commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

When a commshare leader unmerges, store the new leader's team ID in isCommsharing. The old code stores a player ID, which UnitCreated later passes to Spring.TransferUnit as a team ID.

This changes the destination of units created on a remaining member's original team after the leader leaves.

Testing: replay smoke test passed with equal checksums, but did not reach this case. The live case is untested. It needs three squad members with different player and team IDs, followed by a leader unmerge and unit creation on the third member's original team; record the destination team before and after.

AI disclosure: found by OpenAI Codex in a code audit; checked and tested with Claude Code.

🤖 Generated with Claude Code

…er leaves

When the squad leader unmerged, the other members' original teams got
isCommsharing = newleader, a player ID. UnitCreated passes that value to
Spring.TransferUnit as a team ID, so a unit created on such a team went
to the wrong team. The merge path stores a team ID; use leaderTeam.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant