summaryrefslogtreecommitdiffstats
path: root/src/game-server/state.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-01-09 12:12:41 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-01-09 12:12:41 +0100
commit7f712f1c9d00182660298d123d120444ef6a4996 (patch)
tree920a248a636f9e251cd5eb42470b2c516fa82847 /src/game-server/state.cpp
parent8ff3e6674c1d4fc05fc1ba87f42484689fca0879 (diff)
downloadmanaserv-7f712f1c9d00182660298d123d120444ef6a4996.tar.gz
manaserv-7f712f1c9d00182660298d123d120444ef6a4996.tar.xz
manaserv-7f712f1c9d00182660298d123d120444ef6a4996.zip
Fix being direction discrepancies by syncing the BeingDirection.
The server was actually using the bitmask enum while the the client still sent another one, creating discrepancies. A second problem is that the being direction was not properly initialized and not updated while it was moving. Reviewed-by: Jaxad.
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r--src/game-server/state.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp
index bed4780..abfa234 100644
--- a/src/game-server/state.cpp
+++ b/src/game-server/state.cpp
@@ -270,6 +270,7 @@ static void informPlayer(MapComposite *map, Character *p)
enterMsg.writeInt8(static_cast< Being *>(o)->getAction());
enterMsg.writeInt16(opos.x);
enterMsg.writeInt16(opos.y);
+ enterMsg.writeInt8(o->getDirection());
switch (otype)
{
case OBJECT_CHARACTER: