summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-16 15:37:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-16 15:37:44 +0300
commit6efa9dcfeaba6582ca53739a2c9deb1daab8c65c (patch)
treede0d7dbabd3aaedd30fdb022cb4f1716a5bce39c /src/being/being.cpp
parent279efb073f06175d734126b3ba61453347ec4e45 (diff)
downloadmv-6efa9dcfeaba6582ca53739a2c9deb1daab8c65c.tar.gz
mv-6efa9dcfeaba6582ca53739a2c9deb1daab8c65c.tar.bz2
mv-6efa9dcfeaba6582ca53739a2c9deb1daab8c65c.tar.xz
mv-6efa9dcfeaba6582ca53739a2c9deb1daab8c65c.zip
remove useless check for server version while selecting attack animation.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp21
1 files 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