From 19c7e24d6962c549d0e1faba2c204564f5e22e6e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 20 Oct 2019 12:55:24 +0200 Subject: [PATCH] - fixed: MF8_RECREATELIGHTS must be processed in pause mode as well. When issuing a netevent from the console the game is in pause mode, and if this removes a light it would have crashed the game. --- src/p_tick.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/p_tick.cpp b/src/p_tick.cpp index 72202c44ab..7253eafbe5 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -93,7 +93,24 @@ void P_Ticker (void) // run the tic if (paused || P_CheckTickerPaused()) + { + // This must run even when the game is paused to catch changes from netevents before the frame is rendered. + for (auto Level : AllLevels()) + { + auto it = Level->GetThinkerIterator(); + AActor* ac; + + while ((ac = it.Next())) + { + if (ac->flags8 & MF8_RECREATELIGHTS) + { + ac->flags8 &= ~MF8_RECREATELIGHTS; + ac->SetDynamicLights(); + } + } + } return; + } DPSprite::NewTick();