From e5bf44a75f86a57df512836aa611949fbf32f252 Mon Sep 17 00:00:00 2001 From: obligaron Date: Mon, 12 Jul 2021 11:27:43 +0200 Subject: [PATCH] M_DoWalk: Simplify check if we reached new tile --- Source/monster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index ca3a60581..183347352 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1917,7 +1917,7 @@ bool M_DoWalk(int i, int variant) commitment(Monsters[i].MType != nullptr, i); //Check if we reached new tile - bool isAnimationEnd = Monsters[i].AnimInfo.CurrentFrame == Monsters[i].MType->Anims[MA_WALK].Frames; + bool isAnimationEnd = Monsters[i].AnimInfo.CurrentFrame == Monsters[i].AnimInfo.NumberOfFrames; if (isAnimationEnd) { switch (variant) { case MM_WALK: