1
0
Fork 0

Check for damager

This commit is contained in:
NO411 2022-03-19 16:50:19 +01:00
parent d481f7b720
commit 019dd45381
1 changed files with 4 additions and 0 deletions

View File

@ -137,6 +137,10 @@ mcl_damage.register_modifier(function(obj, damage, reason)
damager = entity._shooter damager = entity._shooter
end end
if not damager then
return
end
if vector.dot(obj:get_look_dir(), vector.subtract(damager:get_pos(), obj:get_pos())) < 0 then if vector.dot(obj:get_look_dir(), vector.subtract(damager:get_pos(), obj:get_pos())) < 0 then
return return
end end