mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 08:01:07 +01:00
Check for damager
This commit is contained in:
parent
d481f7b720
commit
019dd45381
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue