summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-14 18:02:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-14 18:02:03 +0300
commit4edbdf124303f0e7c229f43a5054755e112ff6b4 (patch)
tree54d355cb568b07108c08db0f712c072d60c1a7ce /src/being/being.cpp
parent15424641cca695650f4b56c37711c12c81cf2c32 (diff)
downloadmanaplus-4edbdf124303f0e7c229f43a5054755e112ff6b4.tar.gz
manaplus-4edbdf124303f0e7c229f43a5054755e112ff6b4.tar.bz2
manaplus-4edbdf124303f0e7c229f43a5054755e112ff6b4.tar.xz
manaplus-4edbdf124303f0e7c229f43a5054755e112ff6b4.zip
Fix attack sprite actions. Add ride attack action.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index dd06c918d..5a4da79fc 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1309,7 +1309,7 @@ std::string Being::getMoveAction() const
std::string Being::getWeaponAttackAction(const ItemInfo *const weapon) const
{
if (!weapon)
- return SpriteAction::ATTACK;
+ return getAttackAction();
if (mHorseId != 0)
return weapon->getRideAttackAction();
@@ -1327,8 +1327,10 @@ std::string Being::getWeaponAttackAction(const ItemInfo *const weapon) const
std::string Being::getAttackAction(const Attack *const attack1) const
{
if (!attack1)
- return SpriteAction::ATTACK;
+ return getAttackAction();
+ if (mHorseId != 0)
+ return attack1->mRideAction;
if (mMap)
{
const unsigned char mask = mMap->getBlockMask(mX, mY);
@@ -1356,6 +1358,7 @@ std::string Being::getAttackAction(const Attack *const attack1) const
return SpriteAction::action; \
}
+getSpriteAction(Attack, ATTACK)
getSpriteAction(Dead, DEAD)
getSpriteAction(Spawn, SPAWN)
getSpriteAction(Cast, CAST)