mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
- fixed recreation of state lights
This must also happen if the previous state had a light but the current one does not.
This commit is contained in:
parent
8ec6c21195
commit
047c0c9537
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue