summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-31 13:45:40 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-31 14:37:31 -0600
commit9a877ff9180f219e868884f9ef59a6e8cb7a8934 (patch)
treef9e939b04bfb8d545a4c37f74228e10cb9846128 /src/localplayer.cpp
parent7e13e0f2cacc1e0e4177b73eaf71a430094cc58f (diff)
downloadmana-client-9a877ff9180f219e868884f9ef59a6e8cb7a8934.tar.gz
mana-client-9a877ff9180f219e868884f9ef59a6e8cb7a8934.tar.bz2
mana-client-9a877ff9180f219e868884f9ef59a6e8cb7a8934.tar.xz
mana-client-9a877ff9180f219e868884f9ef59a6e8cb7a8934.zip
Don't spam change direction packets
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 1a110810..2cf59f12 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -333,7 +333,7 @@ void LocalPlayer::nextTile(unsigned char dir = 0)
//effectManager->trigger(15, (int) pos.x + (dx * dScaler), (int) pos.y + (dy * dScaler));
setDestination((int) pos.x + (dx * dScaler), (int) pos.y + (dy * dScaler));
}
- else if (dir)
+ else if (dir != mDirection)
{
// If the being can't move, just change direction
Net::getPlayerHandler()->setDirection(dir);
@@ -564,7 +564,7 @@ void LocalPlayer::startWalking(unsigned char dir)
{
setDestination(getTileX() + dx, getTileY() + dy);
}
- else if (dir)
+ else if (dir != mDirection)
{
// If the being can't move, just change direction
Net::getPlayerHandler()->setDirection(dir);