diff options
Diffstat (limited to 'src/scriptapi_env.cpp')
-rw-r--r-- | src/scriptapi_env.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/scriptapi_env.cpp b/src/scriptapi_env.cpp index 9bf7f0b55..efed58e66 100644 --- a/src/scriptapi_env.cpp +++ b/src/scriptapi_env.cpp @@ -662,9 +662,11 @@ int EnvRef::l_line_of_sight(lua_State *L) { v3f pos2 = checkFloatPos(L, 2); //read step size from lua if(lua_isnumber(L, 3)) - stepsize = lua_tonumber(L, 3); + stepsize = lua_tonumber(L, 3); - return (env->line_of_sight(pos1,pos2,stepsize)); + lua_pushboolean(L, env->line_of_sight(pos1,pos2,stepsize)); + + return 1; } int EnvRef::l_find_path(lua_State *L) |