From 22fa9439c8515b52fd816323f9f0a2a0fe985b7e Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Sat, 17 Aug 2024 22:14:43 -0500 Subject: [PATCH] Fix visibility of units restored during limbo missions Units would be sitting in darkness provided they weren't near structures that give visibility. --- src/mission.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mission.cpp b/src/mission.cpp index 8ad1c4a0640..57ac3fd0a06 100644 --- a/src/mission.cpp +++ b/src/mission.cpp @@ -946,6 +946,8 @@ void placeLimboDroids() initDroidMovement(psDroid); //make sure the died flag is not set psDroid->died = false; + //update visibility + visTilesUpdate(psDroid); } else { @@ -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; });