mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
FACTO-177: Added limiting of builderCount and squadCount going negative
This commit is contained in:
parent
482cad2502
commit
34ae40d61b
@ -8,7 +8,7 @@ Version: 3.1.2
|
||||
- Increased enemy pheromone weight for pathing by 2.5x
|
||||
- Increased hive spawning outside resources chunks by 5x
|
||||
Bugfixes:
|
||||
- Fixed sent aggressive squads count could be negative
|
||||
- Fixed sent aggressive squads, builder count, squad count could be negative
|
||||
- Added missing sent and max siege groups on debug log
|
||||
- Fixed small amounts of death generator not being rounded to nil
|
||||
- Fixed enemy base pheromone missing decay based on radius
|
||||
|
@ -437,6 +437,9 @@ function squadAttack.cleanSquads(universe, tick)
|
||||
removeSquadFromChunk(squad.map, squad)
|
||||
if squad.settlers then
|
||||
universe.builderCount = universe.builderCount - 1
|
||||
if universe.builderCount < 0 then
|
||||
universe.builderCount = 0
|
||||
end
|
||||
else
|
||||
universe.squadCount = universe.squadCount - 1
|
||||
if squad.type == BASE_AI_STATE_AGGRESSIVE then
|
||||
@ -446,6 +449,9 @@ function squadAttack.cleanSquads(universe, tick)
|
||||
base.sentAggressiveGroups = 0
|
||||
end
|
||||
end
|
||||
if universe.squadCount < 0 then
|
||||
universe.squadCount = 0
|
||||
end
|
||||
end
|
||||
squads[groupId] = nil
|
||||
elseif (group.state == 4) then
|
||||
|
Loading…
x
Reference in New Issue
Block a user