From 11e1d52cfb9d6bc4e55bf7b00054559829d74039 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 6 Feb 2021 17:10:50 +0000 Subject: [PATCH] replace minetest 5.0 check --- api.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/api.lua b/api.lua index 568d21f..c1ea969 100644 --- a/api.lua +++ b/api.lua @@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20210203", + version = "20210206", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -539,12 +539,10 @@ local ray_line_of_sight = function(self, pos1, pos2) return true end --- detect if using minetest 5.0 by searching for permafrost node -local is_50 = minetest.registered_nodes["default:permafrost"] function mob_class:line_of_sight(pos1, pos2, stepsize) - if is_50 then -- only use if minetest 5.0 is detected + if minetest.raycast then -- only use if minetest 5.0 is detected return ray_line_of_sight(self, pos1, pos2) end