From 9a877ff9180f219e868884f9ef59a6e8cb7a8934 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 31 Mar 2010 13:45:40 -0600 Subject: Don't spam change direction packets Reviewed-by: Chuck Miller --- src/localplayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2