summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-03 18:36:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-03 18:36:32 +0300
commit6bb63b931d7a141aa1483a09941fe9f81974faa4 (patch)
tree92e101b95b037db9895d5c3f37e435c724d221ed /src
parent975f12cdaa4bba66c0e1e18aa3d638f3ae8cad76 (diff)
downloadmanaverse-6bb63b931d7a141aa1483a09941fe9f81974faa4.tar.gz
manaverse-6bb63b931d7a141aa1483a09941fe9f81974faa4.tar.bz2
manaverse-6bb63b931d7a141aa1483a09941fe9f81974faa4.tar.xz
manaverse-6bb63b931d7a141aa1483a09941fe9f81974faa4.zip
Update sprite on changing riding mode.
Diffstat (limited to 'src')
-rw-r--r--src/being/actorsprite.h2
-rw-r--r--src/being/being.cpp8
-rw-r--r--src/being/being.h2
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.