From 7f9c54c79c1bd7e7e2cd7b5f7dd0373d831bc8a8 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Wed, 28 May 2008 16:06:48 +0000 Subject: Change order of direction to up/down/right/left in Being::getSpriteDirection to fix inconsistancy of facing direction when walking diagonally. --- ChangeLog | 6 ++++++ src/being.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4714803f..50f34460 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-28 Dennis Friis + + * src/being.cpp: Change order of direction to up/down/right/left in + Being::getSpriteDirection to fix inconsistancy of facing direction + when walking diagonally. + 2008-05-27 David Athay * src/main.cpp, src/player_relations.cpp: Changed OSX tmw directory to a diff --git a/src/being.cpp b/src/being.cpp index 0e0fd720..625b0eef 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -300,14 +300,14 @@ Being::getSpriteDirection() const { dir = DIRECTION_UP; } - else if (mDirection & RIGHT) - { - dir = DIRECTION_RIGHT; - } else if (mDirection & DOWN) { dir = DIRECTION_DOWN; } + else if (mDirection & RIGHT) + { + dir = DIRECTION_RIGHT; + } else { dir = DIRECTION_LEFT; } -- cgit v1.2.3-70-g09d2