0
0
Fork 0

Increase arrow hit range from 2 to 3

This commit is contained in:
Wuzzy 2018-05-12 19:52:40 +02:00
parent 8fd2097526
commit 7f24912a35
1 changed files with 6 additions and 2 deletions

View File

@ -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