Fixed a possible endless loop.
parent
28f494b69b
commit
47c3d23da0
|
@ -185,7 +185,18 @@ function spawnusher.move_player(player)
|
||||||
-- The node beneath is neither air nor ignore and there is no
|
-- The node beneath is neither air nor ignore and there is no
|
||||||
-- air bubble big enough, lets go upwards and see if that
|
-- air bubble big enough, lets go upwards and see if that
|
||||||
-- helps.
|
-- helps.
|
||||||
pos.y = pos.y + 2
|
while mathutil.in_range(pos.y, -31000, 31000) do
|
||||||
|
pos.y = pos.y + 1
|
||||||
|
|
||||||
|
local upward_node = minetest.get_node(pos).name
|
||||||
|
|
||||||
|
if upward_node == "ignore" then
|
||||||
|
spawnusher.move_later(player, pos)
|
||||||
|
return
|
||||||
|
elseif upward_node ~= "air" then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
elseif current == "ignore" then
|
elseif current == "ignore" then
|
||||||
-- The current node is ignore, which means we need to retry later.
|
-- The current node is ignore, which means we need to retry later.
|
||||||
|
|
Loading…
Reference in New Issue