diff --git a/src/playsim/dthinker.cpp b/src/playsim/dthinker.cpp index 32722f91c..cabdf8668 100644 --- a/src/playsim/dthinker.cpp +++ b/src/playsim/dthinker.cpp @@ -129,7 +129,7 @@ void FThinkerCollection::RunThinkers(FLevelLocals *Level) if (ac->flags8 & MF8_RECREATELIGHTS) { ac->flags8 &= ~MF8_RECREATELIGHTS; - ac->SetDynamicLights(); + if (dolights) ac->SetDynamicLights(); } // This was merged from P_RunEffects to eliminate the costly duplicate ThinkerIterator loop. if ((ac->effects || ac->fountaincolor) && !Level->isFrozen()) @@ -157,9 +157,9 @@ void FThinkerCollection::RunThinkers(FLevelLocals *Level) } } while (count != 0); + recreateLights(); if (dolights) { - recreateLights(); for (auto light = Level->lights; light;) { auto next = light->next; @@ -187,9 +187,9 @@ void FThinkerCollection::RunThinkers(FLevelLocals *Level) } } while (count != 0); + recreateLights(); if (dolights) { - recreateLights(); // Also profile the internal dynamic lights, even though they are not implemented as thinkers. auto &prof = Profiles[NAME_InternalDynamicLight]; prof.timer.Clock(); diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 3c59764be..8ca386766 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -4803,7 +4803,7 @@ void AActor::PostBeginPlay () { PrevAngles = Angles; flags7 |= MF7_HANDLENODELAY; - if (GetInfo()->LightAssociations.Size()) + if (GetInfo()->LightAssociations.Size() || (state && state->Light > 0)) { flags8 |= MF8_RECREATELIGHTS; Level->flags3 |= LEVEL3_LIGHTCREATED;