From 1c0cd16d3f4115aca02e679d6c069d08ae2b5fc6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 10 Feb 2016 18:13:20 +0100 Subject: [PATCH] - 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. --- src/p_mobj.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index eba7f86fd..dde1c80b8 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -620,7 +620,9 @@ bool AActor::SetState (FState *newstate, bool nofunction) if (ObjectFlags & OF_StateChanged) { // The action was an A_Jump-style function that wants to change the next state. ObjectFlags &= ~OF_StateChanged; + FState *saved = newstate; newstate = state; + state = saved; // we need this for comparison of sprites. tics = 0; // make sure we loop and set the new state properly continue; }