mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-17 00:21:07 +01:00
Prevent dereferencing nil in wither.lua, fix minor typo in debug statement
This commit is contained in:
parent
647fecf470
commit
32bc182d01
2 changed files with 3 additions and 2 deletions
|
@ -467,7 +467,8 @@ mcl_mobs.register_arrow("mobs_mc:wither_skull", {
|
||||||
_lifetime = 15,
|
_lifetime = 15,
|
||||||
on_punch = function(self) end,
|
on_punch = function(self) end,
|
||||||
allow_punching = function(self, _, _, object)
|
allow_punching = function(self, _, _, object)
|
||||||
return object:get_luaentity().name ~= "mobs_mc:wither"
|
local le = object and object:get_luaentity()
|
||||||
|
return le and le.name ~= "mobs_mc:wither"
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- direct hit
|
-- direct hit
|
||||||
|
|
|
@ -256,7 +256,7 @@ local function handle_entity_collision(self, entity_def, projectile_def, object)
|
||||||
end
|
end
|
||||||
|
|
||||||
if DEBUG then
|
if DEBUG then
|
||||||
minetest.log("handle_enity_collision("..dump({
|
minetest.log("handle_entity_collision("..dump({
|
||||||
self = self,
|
self = self,
|
||||||
allow_punching = allow_punching,
|
allow_punching = allow_punching,
|
||||||
entity_def = entity_def,
|
entity_def = entity_def,
|
||||||
|
|
Loading…
Reference in a new issue