- fixed particle processing in the main thinker loop

This may not be guarded by the dynamic light flags, only the light ticking may.
This commit is contained in:
Christoph Oelckers 2021-09-24 08:33:37 +02:00
parent d84b44cbd1
commit 3ef60a40a5
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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;