summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2010-02-23 18:47:19 +0100
committerBertram <bertram@cegetel.net>2010-02-23 18:47:19 +0100
commit21d785397e58aa6c62e2e19353d61df73e69a5a0 (patch)
treecb1ef5f2697e23b48a3930f1e117bce54b10bad8 /src/localplayer.cpp
parent4ce429b7f949524b5392d91cf480c933882d15d9 (diff)
downloadmana-21d785397e58aa6c62e2e19353d61df73e69a5a0.tar.gz
mana-21d785397e58aa6c62e2e19353d61df73e69a5a0.tar.bz2
mana-21d785397e58aa6c62e2e19353d61df73e69a5a0.tar.xz
mana-21d785397e58aa6c62e2e19353d61df73e69a5a0.zip
Got rid of superfluous Destination coordinates in LocalPlayer.
This will help simplifying setDestination() calls. No regression seen in both client.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp6
1 files changed, 1 insertions, 5 deletions
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);
}