1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

When mummies attackes, they ignore unknowns

This commit is contained in:
LeMagnesium 2015-03-26 21:17:04 +01:00
parent 718861d80c
commit 194a39011a

View File

@ -392,12 +392,14 @@ 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 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
if mobs < spawner_max_mobs then
pos.x = pos.x+1