From 049f3b1319a849e737c94b2a1c927dccf28c638c Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 27 Sep 2024 20:14:28 -0500 Subject: [PATCH] Fix crashes in mcl_throwing --- mods/ITEMS/mcl_throwing/egg.lua | 2 +- mods/ITEMS/mcl_throwing/ender_pearl.lua | 2 +- mods/ITEMS/mcl_throwing/snowball.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_throwing/egg.lua b/mods/ITEMS/mcl_throwing/egg.lua index 1c3b0eb1d..965953507 100644 --- a/mods/ITEMS/mcl_throwing/egg.lua +++ b/mods/ITEMS/mcl_throwing/egg.lua @@ -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 diff --git a/mods/ITEMS/mcl_throwing/ender_pearl.lua b/mods/ITEMS/mcl_throwing/ender_pearl.lua index f3e48fb78..b07add401 100644 --- a/mods/ITEMS/mcl_throwing/ender_pearl.lua +++ b/mods/ITEMS/mcl_throwing/ender_pearl.lua @@ -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)) diff --git a/mods/ITEMS/mcl_throwing/snowball.lua b/mods/ITEMS/mcl_throwing/snowball.lua index da1b58e25..cbc1e099d 100644 --- a/mods/ITEMS/mcl_throwing/snowball.lua +++ b/mods/ITEMS/mcl_throwing/snowball.lua @@ -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