Skip to content

Commit

Permalink
Fix direction bug in internalMoveCreature
Browse files Browse the repository at this point in the history
  • Loading branch information
marksamman committed May 14, 2015
1 parent 87e4465 commit c4a7072
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit c4a7072

Please sign in to comment.