diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 8ca3867661..7416221270 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -584,7 +584,7 @@ bool AActor::SetState (FState *newstate, bool nofunction) newstate = newstate->GetNextState(); } while (tics == 0); - if (GetInfo()->LightAssociations.Size() || (newstate && newstate->Light > 0)) + if (GetInfo()->LightAssociations.Size() || (state && state->Light > 0)) { flags8 |= MF8_RECREATELIGHTS; Level->flags3 |= LEVEL3_LIGHTCREATED;