mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-11 18:40:25 +01:00
When mummies attackes, they ignore unknowns
This commit is contained in:
parent
718861d80c
commit
194a39011a
@ -392,10 +392,12 @@ if not minetest.setting_getbool("only_peaceful_mobs") then
|
|||||||
local player_near = false
|
local player_near = false
|
||||||
local mobs = 0
|
local mobs = 0
|
||||||
for _,obj in ipairs(minetest.env:get_objects_inside_radius(pos, spawner_range)) do
|
for _,obj in ipairs(minetest.env:get_objects_inside_radius(pos, spawner_range)) do
|
||||||
if obj:is_player() then
|
if obj then
|
||||||
player_near = true
|
if obj:is_player() then
|
||||||
else
|
player_near = true
|
||||||
if obj:get_luaentity().mob_name == "mummy" then mobs = mobs + 1 end
|
else
|
||||||
|
if obj:get_luaentity().mob_name == "mummy" then mobs = mobs + 1 end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if player_near then
|
if player_near then
|
||||||
|
Loading…
Reference in New Issue
Block a user