1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

added check for activeness before adding to active nest queue and

fixed duration not be extended on the check
This commit is contained in:
Aaron Veden 2021-12-07 18:21:27 -08:00
parent e11c71a37f
commit f1204419eb
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84

View File

@ -180,11 +180,13 @@ local function queueNestSpawners(map, chunk, tick)
local chunkId = chunk.id
if not processActiveNest[chunkId] then
processActiveNest[chunkId] = {
map = map,
chunk = chunk,
tick = tick + DURATION_ACTIVE_NEST
}
if (getNestActiveness(map, chunk) > 0) or (getRaidNestActiveness(map, chunk) > 0) then
processActiveNest[chunkId] = {
map = map,
chunk = chunk,
tick = tick + DURATION_ACTIVE_NEST
}
end
end
end
@ -429,6 +431,8 @@ function mapProcessor.processActiveNests(universe, tick)
processNestActiveness(map, chunk)
if (getNestActiveness(map, chunk) == 0) and (getRaidNestActiveness(map, chunk) == 0) then
processActiveNest[chunkId] = nil
else
chunkPack.tick = tick + DURATION_ACTIVE_NEST
end
end
end