no spawn of wolf/deer in protected areas

This commit is contained in:
berengma 2019-11-23 17:14:42 +01:00
parent e756f6d451
commit 63748fa99c

View File

@ -166,9 +166,11 @@ local function spawnstep(dtime)
if obj:is_player() then return end
end
--minetest.chat_send_all('spawnin '.. mobname ..' #deer:' .. dcnt)
if not minetest.is_protected(pos2) then
if not minetest.is_protected(pos2,mobname) then
minetest.add_entity(pos2,mobname) -- ok spawn it already damnit
end
end
end
end