forked from VoxeLibre/VoxeLibre
Increase arrow hit range from 2 to 3
This commit is contained in:
parent
8fd2097526
commit
7f24912a35
|
@ -139,9 +139,13 @@ ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
end
|
end
|
||||||
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
|
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_object
|
||||||
local closest_distance
|
local closest_distance
|
||||||
local ok = false
|
local ok = false
|
||||||
|
|
Loading…
Reference in New Issue