From dabc09adb24e2f0e92c711a330c4f190aaf76ca8 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 25 Nov 2022 00:25:45 +0100 Subject: [PATCH] Lower and unify distance check --- mods/CORE/mcl_events/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_events/init.lua b/mods/CORE/mcl_events/init.lua index f657250e2..5ec2577a9 100644 --- a/mods/CORE/mcl_events/init.lua +++ b/mods/CORE/mcl_events/init.lua @@ -36,7 +36,7 @@ end local function addbars(self) if not self.enable_bossbar then return end for _,player in pairs(minetest.get_connected_players()) do - if vector.distance(self.pos,player:get_pos()) < 75 then + if vector.distance(self.pos,player:get_pos()) < 64 then local bar = mcl_bossbars.add_bar(player, {color = "red", text = self.readable_name .. ": Wave "..self.stage.." / "..self.max_stage, percentage = self.percent }, true,1) table.insert(self.bars,bar) end @@ -120,7 +120,7 @@ function check_events(dtime) for idx,ae in pairs(active_events) do local player_near = false for _,pl in pairs(minetest.get_connected_players()) do - if ae.pos and vector.distance(pl:get_pos(),ae.pos) < 150 then player_near = true end + if ae.pos and vector.distance(pl:get_pos(),ae.pos) < 64 then player_near = true end end if ae.pos and not player_near then mcl_log("[mcl_events] Event "..ae.readable_name.." at "..minetest.pos_to_string(vector.round(ae.pos)).." aborted - no players near." )