- 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:
Christoph Oelckers 2016-02-10 18:13:20 +01:00
parent d18a839836
commit 1c0cd16d3f

View file

@ -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;
} }