From 7f24912a35d581e549b91cd192c18ce60cec998f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 12 May 2018 19:52:40 +0200 Subject: [PATCH] Increase arrow hit range from 2 to 3 --- mods/ITEMS/mcl_bows/arrow.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index a94233ecb9..bd2bee4447 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -139,9 +139,13 @@ ARROW_ENTITY.on_step = function(self, dtime) end end - -- Check for object collision. Done every tick (hopefully this is not too stressing) + -- Check for object "collision". Done every tick (hopefully this is not too stressing) else - local objs = minetest.get_objects_inside_radius(pos, 2) + -- We just check for any hurtable objects nearby. + -- The radius of 3 is fairly liberal, but anything lower than than will cause + -- arrow to hilariously go through mobs often. + -- TODO: Implement an ACTUAL collision detection (engine support needed). + local objs = minetest.get_objects_inside_radius(pos, 3) local closest_object local closest_distance local ok = false