- fixed attached dynamic light setup.

This was only run on a state change and missed every external light change.
Any place which wants to flag a light change now only will set a flag and at the end of the thinker loop all flagged actors will be processed.
For performance reasons this was merged with the P_RunEffects iterator loop.
This commit is contained in:
Christoph Oelckers 2019-08-18 13:48:52 +02:00
commit ae57bc71d4
6 changed files with 29 additions and 36 deletions

View file

@ -577,7 +577,7 @@ bool AActor::SetState (FState *newstate, bool nofunction)
newstate = newstate->GetNextState();
} while (tics == 0);
SetDynamicLights();
flags8 |= MF8_RECREATELIGHTS;
return true;
}
@ -4702,9 +4702,9 @@ void AActor::CallBeginPlay()
void AActor::PostBeginPlay ()
{
SetDynamicLights();
PrevAngles = Angles;
flags7 |= MF7_HANDLENODELAY;
flags8 |= MF8_RECREATELIGHTS;
}
void AActor::CallPostBeginPlay()