summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actorsprite.cpp7
-rw-r--r--src/being/actorsprite.h4
2 files changed, 9 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);
}
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index 02a17ea07..12624aa30 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -177,6 +177,9 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
bool getHaveCart() const A_WARN_UNUSED
{ return mHaveCart; }
+ virtual void setRiding(const bool b)
+ { mRiding = b; }
+
protected:
/**
* Notify self that the stun mode has been updated. Invoked by
@@ -239,6 +242,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
bool mMustResetParticles;
bool mPoison;
bool mHaveCart;
+ bool mRiding;
};
#endif // BEING_ACTORSPRITE_H