From 02d9a083aac8ffb5841d4a193743ca9657b60240 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Fri, 29 May 2026 19:17:58 +0200 Subject: [PATCH] Restore visiblity on sim reset in Atlas The LOS override for all players isn't serialized as such we have to restore it when resetting a game. Fixes: #8926 Signed-off-by: Ralph Sennhauser --- source/tools/atlas/GameInterface/View.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/tools/atlas/GameInterface/View.cpp b/source/tools/atlas/GameInterface/View.cpp index 03c6478520..f48891d4f0 100644 --- a/source/tools/atlas/GameInterface/View.cpp +++ b/source/tools/atlas/GameInterface/View.cpp @@ -38,6 +38,7 @@ #include "renderer/SceneRenderer.h" #include "renderer/backend/ISwapChain.h" #include "simulation2/Simulation2.h" +#include "simulation2/components/ICmpRangeManager.h" #include "simulation2/components/ICmpParticleManager.h" #include "simulation2/components/ICmpPathfinder.h" #include "simulation2/system/Component.h" @@ -372,6 +373,12 @@ void AtlasViewGame::RestoreState(const std::wstring& label) return; simState->Thaw(); + + // LOS override setting isn't part of the sim state as such we have to set + // it again when restoring a game. + CmpPtr cmpRangeManager{*g_Game->GetSimulation2(), SYSTEM_ENTITY}; + if (cmpRangeManager) + cmpRangeManager->SetLosRevealWholeMapForAll(true); } std::wstring AtlasViewGame::DumpState(bool binary)