mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-11 04:03:15 +01:00
Fix crashes in mcl_throwing
This commit is contained in:
parent
8a56008835
commit
e53bb82a3c
@ -56,7 +56,7 @@ vl_projectile.register("mcl_throwing:egg_entity",{
|
|||||||
end
|
end
|
||||||
|
|
||||||
local le = object:get_luaentity()
|
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,
|
end,
|
||||||
on_collide_with_solid = function(self, pos, node)
|
on_collide_with_solid = function(self, pos, node)
|
||||||
if mod_target and node.name == "mcl_target:target_off" then
|
if mod_target and node.name == "mcl_target:target_off" then
|
||||||
|
@ -130,7 +130,7 @@ vl_projectile.register("mcl_throwing:ender_pearl_entity",{
|
|||||||
end
|
end
|
||||||
|
|
||||||
local le = object:get_luaentity()
|
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,
|
end,
|
||||||
on_collide_with_entity = function(self, pos, entity)
|
on_collide_with_entity = function(self, pos, entity)
|
||||||
on_collide(self, pos, minetest.get_node(pos))
|
on_collide(self, pos, minetest.get_node(pos))
|
||||||
|
@ -60,7 +60,7 @@ vl_projectile.register("mcl_throwing:snowball_entity", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
local le = object:get_luaentity()
|
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,
|
end,
|
||||||
on_collide_with_solid = function(self, pos, node)
|
on_collide_with_solid = function(self, pos, node)
|
||||||
if mod_target and node.name == "mcl_target:target_off" then
|
if mod_target and node.name == "mcl_target:target_off" then
|
||||||
|
Loading…
Reference in New Issue
Block a user