Prerequisites
Game Version
Bug Description
Loading a save where units are queued at a dock leaves the queue stuck. A unit that was already docking finishes and leaves normally, but the dock never accepts another one after that. The waiting units sit at their approach positions for the rest of the game, so supply lines stop.
Expected: after loading, the queue keeps running and units dock in turn.
Actual: the dock goes idle with units still queued at it, permanently.
Reproduction Steps
- Start a skirmish and build a supply center with enough workers that one is docked and at least one more is waiting behind it.
- Save while one worker is docked and another is waiting in the queue.
- Load the save.
- Watch the docked worker finish and leave.
Additional Context
DockUpdate::xfer copies each m_approachPositionReached entry into a local Bool and passes that to xferBool. BoolVector is std::vector<bool>, so operator[] returns a proxy rather than a reference and the loaded value is never written back into the vector. m_approachPositionOwners is restored, so the dock still holds its approach slots while every reached flag reads false. isClearToAdvance and DockUpdate::update both read those flags, and onApproachReached only fires from AIDockApproachState::onExit, which a restored unit has already passed.
Prerequisites
Game Version
Bug Description
Loading a save where units are queued at a dock leaves the queue stuck. A unit that was already docking finishes and leaves normally, but the dock never accepts another one after that. The waiting units sit at their approach positions for the rest of the game, so supply lines stop.
Expected: after loading, the queue keeps running and units dock in turn.
Actual: the dock goes idle with units still queued at it, permanently.
Reproduction Steps
Additional Context
DockUpdate::xfercopies eachm_approachPositionReachedentry into a localBooland passes that toxferBool.BoolVectorisstd::vector<bool>, sooperator[]returns a proxy rather than a reference and the loaded value is never written back into the vector.m_approachPositionOwnersis restored, so the dock still holds its approach slots while every reached flag reads false.isClearToAdvanceandDockUpdate::updateboth read those flags, andonApproachReachedonly fires fromAIDockApproachState::onExit, which a restored unit has already passed.