From bdf409c9c4ce083881133879947cc0a6c2cce0f1 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Sat, 16 Oct 2010 17:57:12 +0200 Subject: Fixing wrong SpriteDirection of attacking monsters Reviewed-by: Bertram --- src/being.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/being.cpp b/src/being.cpp index a3e91147..f2d95c4a 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -448,22 +448,20 @@ void Being::setAction(Action action, int attackType) void Being::setDirection(Uint8 direction) { - if (mDirection == direction) - return; + if (Net::getNetworkType() == ServerInfo::MANASERV) + { + if (mDirection == direction) + return; + } mDirection = direction; - // if the direction does not change much, keep the common component - int mFaceDirection = mDirection & direction; - if (!mFaceDirection) - mFaceDirection = direction; - SpriteDirection dir; - if (mFaceDirection & UP) + if (mDirection & UP) dir = DIRECTION_UP; - else if (mFaceDirection & DOWN) + else if (mDirection & DOWN) dir = DIRECTION_DOWN; - else if (mFaceDirection & RIGHT) + else if (mDirection & RIGHT) dir = DIRECTION_RIGHT; else dir = DIRECTION_LEFT; -- cgit v1.2.3-70-g09d2