Navigation Menu

Skip to content

Commit

Permalink
- fixed: MF8_RECREATELIGHTS must be processed in pause mode as well.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
coelckers committed Oct 20, 2019
1 parent ce8b235 commit 19c7e24
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/p_tick.cpp
Expand Up @@ -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();

Expand Down

0 comments on commit 19c7e24

Please sign in to comment.