From 6efa9dcfeaba6582ca53739a2c9deb1daab8c65c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Sep 2014 15:37:44 +0300 Subject: remove useless check for server version while selecting attack animation. --- src/being/being.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/being/being.cpp b/src/being/being.cpp index 853fb20d6..68420f742 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1066,22 +1066,15 @@ std::string Being::getWeaponAttackAction(const ItemInfo *const weapon) const if (!weapon) return SpriteAction::ATTACK; - if (serverVersion < 0) - { - return weapon->getAttackAction(); - } - else + if (mMap) { - if (mMap) - { - const unsigned char mask = mMap->getBlockMask(mX, mY); - if (mask & BlockMask::AIR) - return weapon->getSkyAttackAction(); - else if (mask & BlockMask::WATER) - return weapon->getWaterAttackAction(); - } - return weapon->getAttackAction(); + const unsigned char mask = mMap->getBlockMask(mX, mY); + if (mask & BlockMask::AIR) + return weapon->getSkyAttackAction(); + else if (mask & BlockMask::WATER) + return weapon->getWaterAttackAction(); } + return weapon->getAttackAction(); } std::string Being::getAttackAction(const Attack *const attack1) const -- cgit v1.2.3-70-g09d2