diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 7416221270..a9674122b5 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -499,6 +499,8 @@ bool AActor::SetState (FState *newstate, bool nofunction) { if (debugfile && player && (player->cheats & CF_PREDICTING)) fprintf (debugfile, "for pl %d: SetState while predicting!\n", Level->PlayerNum(player)); + + auto oldstate = state; do { if (newstate == NULL) @@ -584,7 +586,7 @@ bool AActor::SetState (FState *newstate, bool nofunction) newstate = newstate->GetNextState(); } while (tics == 0); - if (GetInfo()->LightAssociations.Size() || (state && state->Light > 0)) + if (GetInfo()->LightAssociations.Size() || (state && state->Light > 0) || (oldstate && oldstate->Light > 0)) { flags8 |= MF8_RECREATELIGHTS; Level->flags3 |= LEVEL3_LIGHTCREATED;