diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/actorsprite.cpp | 5 | ||||
-rw-r--r-- | src/being/actorsprite.h | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index b6c4ea360..a2e7524cc 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -72,7 +72,8 @@ ActorSprite::ActorSprite(const int id) : mCursorPaddingX(0), mCursorPaddingY(0), mMustResetParticles(false), - mPoison(false) + mPoison(false), + mHaveCart(false) { } @@ -219,6 +220,8 @@ void ActorSprite::updateStatusEffect(const int index, const bool newStatus) return; if (effect->isPoison() && getType() == ActorType::Player) setPoison(newStatus); + if (localPlayer == this) + setHaveCart(newStatus); handleStatusEffect(effect, index); } diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index b9889490c..02a17ea07 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -171,6 +171,12 @@ class ActorSprite notfinal : public CompoundSprite, public Actor bool getPoison() const A_WARN_UNUSED { return mPoison; } + void setHaveCart(const bool b) + { mHaveCart = b; } + + bool getHaveCart() const A_WARN_UNUSED + { return mHaveCart; } + protected: /** * Notify self that the stun mode has been updated. Invoked by @@ -232,6 +238,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor /** Reset particle status effects on next redraw? */ bool mMustResetParticles; bool mPoison; + bool mHaveCart; }; #endif // BEING_ACTORSPRITE_H |