- run the dynamic light recreation loop before calling the light ticker.

This was done afterward which performed some needed cleanup too late.
This commit is contained in:
Christoph Oelckers 2021-08-11 15:41:42 +02:00
commit 139f501ec5
2 changed files with 21 additions and 16 deletions

View file

@ -175,22 +175,6 @@ void P_Ticker (void)
{
P_UpdateSpecials(Level);
}
it = Level->GetThinkerIterator<AActor>();
// Set dynamic lights at the end of the tick, so that this catches all changes being made through the last frame.
while ((ac = it.Next()))
{
if (ac->flags8 & MF8_RECREATELIGHTS)
{
ac->flags8 &= ~MF8_RECREATELIGHTS;
ac->SetDynamicLights();
}
// This was merged from P_RunEffects to eliminate the costly duplicate ThinkerIterator loop.
if ((ac->effects || ac->fountaincolor) && !Level->isFrozen())
{
P_RunEffect(ac, ac->effects);
}
}
// for par times
Level->time++;