- 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.
This commit is contained in:
Christoph Oelckers 2019-10-20 12:55:24 +02:00
parent ce8b235d0b
commit 19c7e24d69

View file

@ -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>();
AActor* ac;
while ((ac = it.Next()))
{
if (ac->flags8 & MF8_RECREATELIGHTS)
{
ac->flags8 &= ~MF8_RECREATELIGHTS;
ac->SetDynamicLights();
}
}
}
return;
}
DPSprite::NewTick();