re-enable raycasting line of sight (should work now)
This commit is contained in:
parent
9b0ff17101
commit
bff313267b
10
api.lua
10
api.lua
@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20200411",
|
version = "20200412",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
@ -463,9 +463,9 @@ local ray_line_of_sight = function(self, pos1, pos2)
|
|||||||
|
|
||||||
while thing do
|
while thing do
|
||||||
|
|
||||||
if thing.type == "object"
|
-- if thing.type == "object"
|
||||||
and thing.ref ~= self.object
|
-- and thing.ref ~= self.object
|
||||||
and not thing.ref:is_player() then return false end
|
-- and not thing.ref:is_player() then return false end
|
||||||
|
|
||||||
if thing.type == "node" then
|
if thing.type == "node" then
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ local ray_line_of_sight = function(self, pos1, pos2)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- detect if using minetest 5.0 by searching for permafrost node
|
-- detect if using minetest 5.0 by searching for permafrost node
|
||||||
local is_50 = nil -- minetest.registered_nodes["default:permafrost"]
|
local is_50 = minetest.registered_nodes["default:permafrost"]
|
||||||
|
|
||||||
function mob_class:line_of_sight(pos1, pos2, stepsize)
|
function mob_class:line_of_sight(pos1, pos2, stepsize)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user