From 6bdbbe247566728390ad7fee19ea233405433651 Mon Sep 17 00:00:00 2001 From: Bertram Date: Thu, 15 Oct 2009 00:46:27 +0200 Subject: Speed code unification part 1: Made the server accept speed values in tiles per second. --- src/scripting/lua.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/scripting/lua.cpp') 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; } -- cgit v1.2.3-70-g09d2