mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 07:41:22 +00:00
- fixed: AActor::SetState must restore the 'state' member to the actual calling state after it detected OF_StateChanged.
This is needed to decide how the '####' and '----' placeholders should behave.
This commit is contained in:
parent
d18a839836
commit
1c0cd16d3f
1 changed files with 2 additions and 0 deletions
|
@ -620,7 +620,9 @@ bool AActor::SetState (FState *newstate, bool nofunction)
|
||||||
if (ObjectFlags & OF_StateChanged)
|
if (ObjectFlags & OF_StateChanged)
|
||||||
{ // The action was an A_Jump-style function that wants to change the next state.
|
{ // The action was an A_Jump-style function that wants to change the next state.
|
||||||
ObjectFlags &= ~OF_StateChanged;
|
ObjectFlags &= ~OF_StateChanged;
|
||||||
|
FState *saved = newstate;
|
||||||
newstate = state;
|
newstate = state;
|
||||||
|
state = saved; // we need this for comparison of sprites.
|
||||||
tics = 0; // make sure we loop and set the new state properly
|
tics = 0; // make sure we loop and set the new state properly
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue