mirror of
https://github.com/minetest/minetest.git
synced 2024-11-24 00:23:46 +01:00
Fix line_of_sight (AGAIN)
This commit is contained in:
parent
f87c1c2410
commit
4f246f0e22
@ -660,10 +660,12 @@ int ModApiEnvMod::l_line_of_sight(lua_State *L) {
|
|||||||
// read position 2 from lua
|
// read position 2 from lua
|
||||||
v3f pos2 = checkFloatPos(L, 2);
|
v3f pos2 = checkFloatPos(L, 2);
|
||||||
//read step size from lua
|
//read step size from lua
|
||||||
if (lua_isnumber(L, 3))
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// minetest.find_path(pos1, pos2, searchdistance,
|
// minetest.find_path(pos1, pos2, searchdistance,
|
||||||
|
Loading…
Reference in New Issue
Block a user