Fix crashes in mcl_throwing

This commit is contained in:
teknomunk 2024-09-27 20:14:28 -05:00
parent 4c62167ba3
commit 049f3b1319
3 changed files with 3 additions and 3 deletions

View file

@ -56,7 +56,7 @@ vl_projectile.register("mcl_throwing:egg_entity",{
end
local le = object:get_luaentity()
return le and le.is_mob or le._hittable_by_projectile or object:is_player()
return le and (le.is_mob or le._hittable_by_projectile) or object:is_player()
end,
on_collide_with_solid = function(self, pos, node)
if mod_target and node.name == "mcl_target:target_off" then

View file

@ -130,7 +130,7 @@ vl_projectile.register("mcl_throwing:ender_pearl_entity",{
end
local le = object:get_luaentity()
return le and le.is_mob or le._hittable_by_projectile or object:is_player()
return le and (le.is_mob or le._hittable_by_projectile) or object:is_player()
end,
on_collide_with_entity = function(self, pos, entity)
on_collide(self, pos, minetest.get_node(pos))

View file

@ -60,7 +60,7 @@ vl_projectile.register("mcl_throwing:snowball_entity", {
end
local le = object:get_luaentity()
return le and le.is_mob or le._hittable_by_projectile or object:is_player()
return le and (le.is_mob or le._hittable_by_projectile) or object:is_player()
end,
on_collide_with_solid = function(self, pos, node)
if mod_target and node.name == "mcl_target:target_off" then