From fc94f50e6a3b30da225ae0b35fe82624b70b6942 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 27 May 2018 10:33:49 +0200 Subject: [PATCH] Fix another logic fail in arrow mob detect code --- mods/ITEMS/mcl_bows/arrow.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index bd2bee4447..7137526328 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -148,7 +148,6 @@ ARROW_ENTITY.on_step = function(self, dtime) local objs = minetest.get_objects_inside_radius(pos, 3) local closest_object local closest_distance - local ok = false if self._deflection_cooloff > 0 then self._deflection_cooloff = self._deflection_cooloff - dtime @@ -156,6 +155,7 @@ ARROW_ENTITY.on_step = function(self, dtime) -- Iterate through all objects and remember the closest attackable object for k, obj in pairs(objs) do + local ok = false -- Arrows can only damage players and mobs if obj ~= self._shooter and obj:is_player() then ok = true