From eb7097d1a3a7dfcc043cf848066fb5a153c0cfe6 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 4 Jun 2019 15:35:26 +0300 Subject: [PATCH] (439f256af) Don't reset the los if there is no client (single player). Fixes los resetting between game sessions (less tedious debugging). --- .../BarotraumaShared/Source/GameSession/GameSession.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/GameSession/GameSession.cs b/Barotrauma/BarotraumaShared/Source/GameSession/GameSession.cs index 32e255691..7a47bff0e 100644 --- a/Barotrauma/BarotraumaShared/Source/GameSession/GameSession.cs +++ b/Barotrauma/BarotraumaShared/Source/GameSession/GameSession.cs @@ -159,8 +159,14 @@ namespace Barotrauma public void StartRound(Level level, bool reloadSub = true, bool loadSecondSub = false, bool mirrorLevel = false) { #if CLIENT - GameMain.LightManager.LosEnabled = GameMain.Client == null || GameMain.Client.CharacterInfo != null; - if (GameMain.Client == null) GameMain.LightManager.LosMode = GameMain.Config.LosMode; + if (GameMain.Client == null) + { + GameMain.LightManager.LosMode = GameMain.Config.LosMode; + } + else + { + GameMain.LightManager.LosEnabled = GameMain.Client.CharacterInfo != null; + } #endif this.Level = level;