summaryrefslogtreecommitdiff
path: root/src/being/actorsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-03 17:47:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-03 17:47:17 +0300
commitad43e58d901bcc89632c80bdcf498acf2f1717c2 (patch)
treea386e723b0e5d090279704bb28b06334e117588d /src/being/actorsprite.cpp
parent421c0d17d65ee740c992c96b04a00b846b50a2e5 (diff)
downloadmv-ad43e58d901bcc89632c80bdcf498acf2f1717c2.tar.gz
mv-ad43e58d901bcc89632c80bdcf498acf2f1717c2.tar.bz2
mv-ad43e58d901bcc89632c80bdcf498acf2f1717c2.tar.xz
mv-ad43e58d901bcc89632c80bdcf498acf2f1717c2.zip
Add support for riding flag in actorsprite and statuseffect.
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r--src/being/actorsprite.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 343018204..9f21d4996 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -73,7 +73,8 @@ ActorSprite::ActorSprite(const int id) :
mCursorPaddingY(0),
mMustResetParticles(false),
mPoison(false),
- mHaveCart(false)
+ mHaveCart(false),
+ mRiding(false)
{
}
@@ -220,8 +221,10 @@ void ActorSprite::updateStatusEffect(const int index, const bool newStatus)
return;
if (effect->isPoison() && getType() == ActorType::Player)
setPoison(newStatus);
- if (effect->isCart() && localPlayer == this)
+ else if (effect->isCart() && localPlayer == this)
setHaveCart(newStatus);
+ else if (effect->isRiding())
+ setRiding(newStatus);
handleStatusEffect(effect, index);
}