mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 05:51:05 +01:00
shields: Fix crash when deflecting ghast fireball
This commit is contained in:
parent
b96fb2af17
commit
e7970ecce5
1 changed files with 2 additions and 2 deletions
|
@ -140,8 +140,8 @@ mcl_damage.register_modifier(function(obj, damage, reason)
|
||||||
if not damager then
|
if not damager then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local dpos = damager:get_pos()
|
||||||
if vector.dot(obj:get_look_dir(), vector.subtract(damager:get_pos(), obj:get_pos())) < 0 then
|
if dpos and vector.dot(obj:get_look_dir(), vector.subtract(dpos, obj:get_pos())) < 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue