mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-12 21:52:01 +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))
|
if (debugfile && player && (player->cheats & CF_PREDICTING))
|
||||||
fprintf (debugfile, "for pl %d: SetState while predicting!\n", Level->PlayerNum(player));
|
fprintf (debugfile, "for pl %d: SetState while predicting!\n", Level->PlayerNum(player));
|
||||||
|
|
||||||
|
auto oldstate = state;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (newstate == NULL)
|
if (newstate == NULL)
|
||||||
|
@ -584,7 +586,7 @@ bool AActor::SetState (FState *newstate, bool nofunction)
|
||||||
newstate = newstate->GetNextState();
|
newstate = newstate->GetNextState();
|
||||||
} while (tics == 0);
|
} 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;
|
flags8 |= MF8_RECREATELIGHTS;
|
||||||
Level->flags3 |= LEVEL3_LIGHTCREATED;
|
Level->flags3 |= LEVEL3_LIGHTCREATED;
|
||||||
|
|
Loading…
Reference in a new issue