mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 19:02:26 +01:00
Check for damager
This commit is contained in:
parent
d481f7b720
commit
019dd45381
@ -137,6 +137,10 @@ mcl_damage.register_modifier(function(obj, damage, reason)
|
||||
damager = entity._shooter
|
||||
end
|
||||
|
||||
if not damager then
|
||||
return
|
||||
end
|
||||
|
||||
if vector.dot(obj:get_look_dir(), vector.subtract(damager:get_pos(), obj:get_pos())) < 0 then
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user