diff options
author | Bertram <bertram@cegetel.net> | 2009-10-15 00:46:27 +0200 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2009-10-15 00:46:27 +0200 |
commit | 6bdbbe247566728390ad7fee19ea233405433651 (patch) | |
tree | 5ecb1d81221299dbf2ec4375cb769b7d783b9859 /src/scripting/lua.cpp | |
parent | 257b9e19f26ecd29cd86177dd70765517bbc9863 (diff) | |
download | manaserv-6bdbbe247566728390ad7fee19ea233405433651.tar.gz manaserv-6bdbbe247566728390ad7fee19ea233405433651.tar.bz2 manaserv-6bdbbe247566728390ad7fee19ea233405433651.tar.xz manaserv-6bdbbe247566728390ad7fee19ea233405433651.zip |
Speed code unification part 1: Made the server accept speed values in tiles per second.
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r-- | src/scripting/lua.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 62bf3729..ae02eabf 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -586,6 +586,7 @@ static int being_type(lua_State *s) /** * Function for making a being walk to a position * being_walk(Being *being, int x, int y, int speed) + * The speed is in tile per second */ static int being_walk(lua_State *s) { @@ -601,7 +602,7 @@ static int being_walk(lua_State *s) Being *being = getBeing(s, 1); Point destination(lua_tointeger(s, 2), lua_tointeger(s, 3)); being->setDestination(destination); - being->setSpeed(lua_tointeger(s, 4)); + being->setSpeed(lua_tofloat(s, 4)); return 0; } |