Crossbow: Pass player as puncher instead of arrow object

This commit is contained in:
ANAND 2020-04-26 21:39:07 +05:30
parent ea8af36b47
commit 3d7ad1a6bc
No known key found for this signature in database
GPG key ID: 3AD8A3C4A51AAB97

View file

@ -84,7 +84,7 @@ local function strike(arrow, pointed_thing, name)
if groups.fleshy then if groups.fleshy then
shooter.spawn_particles(hit_pos) shooter.spawn_particles(hit_pos)
end end
target:punch(object, nil, arrow_tool_caps, dir) target:punch(puncher, nil, arrow_tool_caps, dir)
if config.arrow_object_attach then if config.arrow_object_attach then
local pos = vector.multiply(vector.subtract(target:get_pos(), local pos = vector.multiply(vector.subtract(target:get_pos(),
hit_pos), -10) hit_pos), -10)