From 111b5c60c173704683db01dfd14771f2e74dbe25 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 1 Sep 2012 22:34:09 +0000 Subject: [PATCH] - Fixed: The check in P_SpawnBlood() to avoid advancing the state to something not owned by the spawned blood actor was backwards and would only advance to state's NOT owned by it. SVN r3861 (trunk) --- src/p_mobj.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 7ec1224db7..7e863a8252 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4864,14 +4864,15 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc while (cls != RUNTIME_CLASS(AActor)) { FActorInfo *ai = cls->ActorInfo; + int checked_advance = advance; if (ai->OwnsState(th->SpawnState)) { - for (; advance > 0; --advance) + for (; checked_advance > 0; --checked_advance) { // [RH] Do not set to a state we do not own. - if (!ai->OwnsState(th->SpawnState + advance)) + if (ai->OwnsState(th->SpawnState + checked_advance)) { - th->SetState(th->SpawnState + advance); + th->SetState(th->SpawnState + checked_advance); goto statedone; } }