summaryrefslogtreecommitdiff
path: root/src/scripting/lua.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/scripting/lua.cpp
parent8ff3e6674c1d4fc05fc1ba87f42484689fca0879 (diff)
downloadmanaserv-7f712f1c9d00182660298d123d120444ef6a4996.tar.gz
manaserv-7f712f1c9d00182660298d123d120444ef6a4996.tar.bz2
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/scripting/lua.cpp')
-rw-r--r--src/scripting/lua.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp
index 2635974e..3a615412 100644
--- a/src/scripting/lua.cpp
+++ b/src/scripting/lua.cpp
@@ -852,7 +852,7 @@ static int being_set_direction(lua_State *s)
{
Being *being = getBeing(s, 1);
- int dir = lua_tointeger(s, 2);
+ BeingDirection dir = (BeingDirection) lua_tointeger(s, 2);
if (being)
{