diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-16 17:57:12 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-16 17:57:55 +0200 |
commit | bdf409c9c4ce083881133879947cc0a6c2cce0f1 (patch) | |
tree | 6ff1966edd358718f9c47321a7386b4459282355 /src | |
parent | 5958c2f20b4c4c7080e525bab314b1e6aa5ddd0e (diff) | |
download | mana-bdf409c9c4ce083881133879947cc0a6c2cce0f1.tar.gz mana-bdf409c9c4ce083881133879947cc0a6c2cce0f1.tar.bz2 mana-bdf409c9c4ce083881133879947cc0a6c2cce0f1.tar.xz mana-bdf409c9c4ce083881133879947cc0a6c2cce0f1.zip |
Fixing wrong SpriteDirection of attacking monsters
Reviewed-by: Bertram
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 18 |
1 files 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; |