diff options
-rw-r--r-- | src/being.h | 7 | ||||
-rw-r--r-- | src/localplayer.cpp | 6 | ||||
-rw-r--r-- | src/localplayer.h | 2 |
3 files changed, 5 insertions, 10 deletions
diff --git a/src/being.h b/src/being.h index 58fe4c77..3b63b02d 100644 --- a/src/being.h +++ b/src/being.h @@ -645,6 +645,8 @@ class Being : public Sprite, public ConfigListener ParticleVector mStatusParticleEffects; ParticleList mChildParticleEffects; + Vector mDest; /**< destination coordinates. */ + private: /** @@ -668,9 +670,8 @@ class Being : public Sprite, public ConfigListener */ Vector mWalkSpeed; - Vector mPos; - Vector mDest; - int mX, mY; /**< Position on tile */ + Vector mPos; /**< Position coordinates. */ + int mX, mY; /**< Position in tile */ int mDamageTaken; diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 8133bf4a..6f63d799 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -98,7 +98,6 @@ LocalPlayer::LocalPlayer(int id, int job): mLastAction(-1), mWalkingDir(0), mPathSetByMouse(false), - mDestX(0), mDestY(0), mInventory(new Inventory(Net::getInventoryHandler() ->getSize(Net::InventoryHandler::INVENTORY))), mLocalWalkTime(-1), @@ -516,11 +515,8 @@ void LocalPlayer::setDestination(int x, int y) } // Only send a new message to the server when destination changes - if (x != mDestX || y != mDestY) + if (x != mDest.x || y != mDest.y) { - mDestX = x; - mDestY = y; - Being::setDestination(x, y); Net::getPlayerHandler()->setDestination(x, y, mDirection); } diff --git a/src/localplayer.h b/src/localplayer.h index c9f6c5b5..6279d546 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -474,8 +474,6 @@ class LocalPlayer : public Player int mLastAction; /**< Time stamp of the last action, -1 if none. */ int mWalkingDir; /**< The direction the player is walking in. */ bool mPathSetByMouse; /**< Tells if the path was set using mouse */ - int mDestX; /**< X coordinate of destination. */ - int mDestY; /**< Y coordinate of destination. */ std::vector<int> mStatusEffectIcons; |