From 194a39011ac8b55a513e076be334b9107d6b97aa Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Thu, 26 Mar 2015 21:17:04 +0100 Subject: [PATCH] When mummies attackes, they ignore unknowns --- mods/tsm_pyramids/mummy.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/tsm_pyramids/mummy.lua b/mods/tsm_pyramids/mummy.lua index 0d2b5c86..3af06b94 100644 --- a/mods/tsm_pyramids/mummy.lua +++ b/mods/tsm_pyramids/mummy.lua @@ -392,10 +392,12 @@ if not minetest.setting_getbool("only_peaceful_mobs") then local player_near = false local mobs = 0 for _,obj in ipairs(minetest.env:get_objects_inside_radius(pos, spawner_range)) do - if obj:is_player() then - player_near = true - else - if obj:get_luaentity().mob_name == "mummy" then mobs = mobs + 1 end + if obj then + if obj:is_player() then + player_near = true + else + if obj:get_luaentity().mob_name == "mummy" then mobs = mobs + 1 end + end end end if player_near then