From 6c804f44d55b7e2f4efc07949807ab26b51a61f6 Mon Sep 17 00:00:00 2001 From: epCode <64379263+epCode@users.noreply.github.com> Date: Mon, 6 Jun 2022 18:43:50 -0700 Subject: [PATCH] add a small bit of doc --- mods/ITEMS/mcl_bows/arrow.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index fb5874982..8edf75011 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -198,9 +198,11 @@ function ARROW_ENTITY.on_step(self, dtime) end local arrow_dir = self.object:get_velocity() + --create a raycast from the arrow based on the velocity of the arrow to deal with lag local raycast = minetest.raycast(pos, vector.add(pos, vector.multiply(arrow_dir, 0.1)), true, false) for hitpoint in raycast do if hitpoint.type == "object" then + -- find the closest object that is in the way of the arrow local ok = false if hitpoint.ref:is_player() then ok = true