mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-07-08 07:40:31 -04:00
Add clearance check for spawning, Improved obstacle avoidance
This commit is contained in:
parent
da15c361cf
commit
b41924d4cb
4 changed files with 53 additions and 36 deletions
3
api.lua
3
api.lua
|
@ -135,7 +135,8 @@ function creatura.get_node_def(node) -- Node can be name or pos
|
|||
return def
|
||||
end
|
||||
|
||||
function creatura.get_ground_level(pos2, max_diff)
|
||||
function creatura.get_ground_level(pos, max_diff)
|
||||
local pos2 = pos -- Prevent modifying table that shouldn't be changed
|
||||
pos2.y = math.floor(pos2.y - 0.49)
|
||||
local node = minetest.get_node(pos2)
|
||||
local node_under = minetest.get_node({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue