From 312dc0e8b5b92aecabff6b95890bab95e701c09c Mon Sep 17 00:00:00 2001 From: Foz Date: Fri, 23 Sep 2016 23:19:19 -0400 Subject: [PATCH] Set puncher to the user for grenades/rockets. Previously, on_punch() indicated that victims of grenades and rocket launcher attacks were punching themselves. --- shooter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shooter.lua b/shooter.lua index 6e9ae3d..abc81bc 100644 --- a/shooter.lua +++ b/shooter.lua @@ -393,7 +393,7 @@ function shooter:blast(pos, radius, fleshy, distance, user) obj_pos.y = obj_pos.y + 1.7 blast_pos = {x=pos.x, y=pos.y + 4, z=pos.z} if minetest.line_of_sight(obj_pos, blast_pos, 1) then - obj:punch(obj, 1.0, { + obj:punch(user, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy=damage}, })