summaryrefslogtreecommitdiff
path: root/src/net/manaserv/beinghandler.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-10-29 11:20:29 +0100
committerBertram <bertram@cegetel.net>2009-10-29 11:20:29 +0100
commit6d2a6ee01523bbec105cd2e6ce9a24ab7c1094f2 (patch)
tree99bd2c18c08a034a5fcffe49dfa3d2ade43095b0 /src/net/manaserv/beinghandler.cpp
parent45223500f7a5f661adea71e57010b018bac2cf32 (diff)
downloadmana-6d2a6ee01523bbec105cd2e6ce9a24ab7c1094f2.tar.gz
mana-6d2a6ee01523bbec105cd2e6ce9a24ab7c1094f2.tar.bz2
mana-6d2a6ee01523bbec105cd2e6ce9a24ab7c1094f2.tar.xz
mana-6d2a6ee01523bbec105cd2e6ce9a24ab7c1094f2.zip
Second round of fine tuning for keyboard movement.
I just discovered that the X,Y offsets aren't handled the same way between eAthena and Manaserv to draw the player's character. So, this patch hopefully fix the walk on water bug. There are some glitches left: - Like walking diagonally to a blocked corner. - Or Some times the character miss a blocked tile and correct its route. - The character's name is drawn in the wrong place for Manaserv client. - The playerBox draws the player at the wrong location; He's not centered at login and isn't diplayed at all in equipment window... But anyway, it's better than before. I'll go on for some polishing before continuing. Some cleanups are becoming vital for code's understanding.
Diffstat (limited to 'src/net/manaserv/beinghandler.cpp')
-rw-r--r--src/net/manaserv/beinghandler.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp
index 3df346a4..d8508f01 100644
--- a/src/net/manaserv/beinghandler.cpp
+++ b/src/net/manaserv/beinghandler.cpp
@@ -313,12 +313,18 @@ void BeingHandler::handleBeingDirChangeMessage(MessageIn &msg)
if (!being)
return;
int data = msg.readInt8();
- switch (data)
+
+ // The direction for the player's character is handled on client side.
+ if (being != player_node)
{
- case DIRECTION_UP: being->setDirection(Being::UP); break;
- case DIRECTION_DOWN: being->setDirection(Being::DOWN); break;
- case DIRECTION_LEFT: being->setDirection(Being::LEFT); break;
- case DIRECTION_RIGHT: being->setDirection(Being::RIGHT); break;
+ switch (data)
+ {
+ case DIRECTION_UP: being->setDirection(Being::UP); break;
+ case DIRECTION_DOWN: being->setDirection(Being::DOWN); break;
+ case DIRECTION_LEFT: being->setDirection(Being::LEFT); break;
+ case DIRECTION_RIGHT: being->setDirection(Being::RIGHT); break;
+ default: break;
+ }
}
}