Skip to content

Commit

Permalink
Fix visibility of units restored during limbo missions
Browse files Browse the repository at this point in the history
Units would be sitting in darkness provided they weren't near structures that give visibility.
  • Loading branch information
KJeff01 committed Aug 18, 2024
1 parent b826514 commit 916f682
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,8 @@ void placeLimboDroids()
initDroidMovement(psDroid);
//make sure the died flag is not set
psDroid->died = false;
//update visibility
visTilesUpdate(psDroid);
}
else
{
Expand Down Expand Up @@ -973,6 +975,10 @@ void restoreMissionLimboData()
//reset droid orders
orderDroid(psDroid, DORDER_STOP, ModeImmediate);
//the location of the droid should be valid!
if (psDroid->pos.x != INVALID_XY && psDroid->pos.y != INVALID_XY)
{
visTilesUpdate(psDroid); //update visibility
}
}
return IterationResult::CONTINUE_ITERATION;
});
Expand Down

0 comments on commit 916f682

Please sign in to comment.