forked from MineClone5/MineClone5
Mobs: Fix line-of-sight handling (thanks, chon!)
This commit is contained in:
parent
b6c21ee841
commit
d4fe313077
|
@ -256,8 +256,7 @@ local line_of_sight = function(self, pos1, pos2, stepsize)
|
||||||
-- It continues to advance in the line of sight in search of a real
|
-- It continues to advance in the line of sight in search of a real
|
||||||
-- obstruction which counts as 'normal' nodebox.
|
-- obstruction which counts as 'normal' nodebox.
|
||||||
while minetest.registered_nodes[nn]
|
while minetest.registered_nodes[nn]
|
||||||
and (minetest.registered_nodes[nn].walkable == false
|
and minetest.registered_nodes[nn].walkable == false do
|
||||||
or minetest.registered_nodes[nn].drawtype == "nodebox") do
|
|
||||||
|
|
||||||
-- Check if you can still move forward
|
-- Check if you can still move forward
|
||||||
if td < ad + stepsize then
|
if td < ad + stepsize then
|
||||||
|
|
Loading…
Reference in New Issue