mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-01-11 01:29:36 +01:00
Merge pull request 'Shields: Fix crash when deflecting ghast fireball ( #2095 )' (#2103) from fix-shield-ghast-crash into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2103 Reviewed-by: NO11 <no11@noreply.git.minetest.land>
This commit is contained in:
commit
83c91aba93
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
|
||||
return
|
||||
end
|
||||
|
||||
if vector.dot(obj:get_look_dir(), vector.subtract(damager:get_pos(), obj:get_pos())) < 0 then
|
||||
local dpos = damager:get_pos()
|
||||
if dpos and vector.dot(obj:get_look_dir(), vector.subtract(dpos, obj:get_pos())) < 0 then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue