diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-05 18:30:14 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-10-05 18:30:14 +0200 |
commit | f75c8fac584e1647745c0b5bf1fe8e50fc3209d5 (patch) | |
tree | d9275896ea622b152424fe79a02aa67bed7aeddb /src/localplayer.cpp | |
parent | 7fa20ba5839d8674d9c4023f55419fbc21e00c07 (diff) | |
download | mana-f75c8fac584e1647745c0b5bf1fe8e50fc3209d5.tar.gz mana-f75c8fac584e1647745c0b5bf1fe8e50fc3209d5.tar.bz2 mana-f75c8fac584e1647745c0b5bf1fe8e50fc3209d5.tar.xz mana-f75c8fac584e1647745c0b5bf1fe8e50fc3209d5.zip |
Send the server changed player direction if it changes during attack
Reviewed-by: Jaxad0127
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 9c64c6dc..b4418bbc 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -1007,20 +1007,23 @@ void LocalPlayer::attack(Being *target, bool keep) if (mAction != STAND) return; + Uint8 direction = 0; if (abs(dist_y) >= abs(dist_x)) { if (dist_y > 0) - setDirection(DOWN); + direction = DOWN; else - setDirection(UP); + direction = UP; } else { if (dist_x > 0) - setDirection(RIGHT); + direction = RIGHT; else - setDirection(LEFT); + direction = LEFT; } + Net::getPlayerHandler()->setDirection(direction); + setDirection(direction); mWalkTime = tick_time; mTargetTime = tick_time; |