diff options
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/actorsprite.h | 2 | ||||
-rw-r--r-- | src/being/being.cpp | 8 | ||||
-rw-r--r-- | src/being/being.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index e0c64b017..9dfbef8d4 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -177,7 +177,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor bool getHaveCart() const A_WARN_UNUSED { return mHaveCart; } - void setRiding(const bool b) + virtual void setRiding(const bool b) { mRiding = b; } protected: diff --git a/src/being/being.cpp b/src/being/being.cpp index 62eded545..8143f1c90 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3570,3 +3570,11 @@ bool Being::isSellShopEnabled() const { return mShop && (!serverFeatures->haveVending() || !mSellBoard.empty()); } + +void Being::setRiding(const bool b) +{ + if (b == mRiding) + return; + mRiding = b; + setAction(mAction, 0); +} diff --git a/src/being/being.h b/src/being/being.h index 6e7fb346c..994733727 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -927,6 +927,8 @@ class Being notfinal : public ActorSprite, std::string getBuyBoard() const A_WARN_UNUSED { return mBuyBoard; } + void setRiding(const bool b) override final; + protected: /** * Updates name's location. |