forked from mtcontrib/mobs_redo
Added extra check for line of sight when flying in custom node.
This commit is contained in:
parent
db7e02af1a
commit
d1bee49785
13
api.lua
13
api.lua
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
-- Mobs Api (11th June 2016)
|
-- Mobs Api (17th June 2016)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
|
@ -216,6 +216,17 @@ function line_of_sight_water(self, pos1, pos2, stepsize)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- just incase we have a special node for flying/swimming mobs
|
||||||
|
elseif s == false
|
||||||
|
and self.fly
|
||||||
|
and self.fly_in then
|
||||||
|
|
||||||
|
local nod = minetest.get_node(pos_w).name
|
||||||
|
|
||||||
|
if nod == self.fly_in then
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user