Skip fortress mob placement if there aren't any.

This commit is contained in:
Duane 2016-06-14 09:56:28 -05:00
parent cd42c129c3
commit 4f66ec44bd

View file

@ -50,8 +50,7 @@ minetest.register_globalstep(function(dtime)
local minp = vector.subtract(pos, 0.5) local minp = vector.subtract(pos, 0.5)
local maxp = vector.add(pos, 0.5) local maxp = vector.add(pos, 0.5)
if fun_caves.fortress_spawns if fun_caves.fortress_spawns and #fun_caves.fortress_spawns > 0 and dps_count % monster_delay == 0 then
and dps_count % monster_delay == 0 then
local mob_count = 0 local mob_count = 0
for _, mob in pairs(minetest.luaentities) do for _, mob in pairs(minetest.luaentities) do
if mob.health and mob.started_in_fortress then if mob.health and mob.started_in_fortress then