From c4a707201c7c69c2a150a4892b736f4a45ddfa96 Mon Sep 17 00:00:00 2001 From: Mark Samman Date: Thu, 14 May 2015 22:04:05 +0200 Subject: [PATCH] Fix direction bug in internalMoveCreature --- src/game.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game.cpp b/src/game.cpp index 45a14c4732..9902b59277 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -867,7 +867,10 @@ ReturnValue Game::internalMoveCreature(Creature& creature, Tile& toTile, uint32_ const Position& fromPosition = fromCylinder->getPosition(); const Position& toPosition = toCylinder->getPosition(); if (fromPosition.z != toPosition.z && (fromPosition.x != toPosition.x || fromPosition.y != toPosition.y)) { - internalCreatureTurn(&creature, getDirectionTo(fromPosition, toPosition)); + Direction dir = getDirectionTo(fromPosition, toPosition); + if ((dir & DIRECTION_DIAGONAL_MASK) == 0) { + internalCreatureTurn(&creature, dir); + } } }