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

FACTO-170: Death generator not being rounded to nil once it reach less

than 0.001
This commit is contained in:
Aaron Veden 2022-06-12 21:19:18 -07:00
parent 3dabae1057
commit 602f75ffa1
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
3 changed files with 6 additions and 5 deletions

View File

@ -6,6 +6,7 @@ Version: 3.1.2
Bugfixes:
- Fixed sent aggressive squads 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
Framework:
- Updated visualizer tool for debugging

View File

@ -455,7 +455,7 @@ function chunkPropertyUtils.addDeathGenerator(map, chunk, value)
end
function chunkPropertyUtils.setDeathGenerator(map, chunk, value)
if (value <= 0) then
if (value <= 0.001) then
map.chunkToDeathGenerator[chunk.id] = nil
else
map.chunkToDeathGenerator[chunk.id] = value

View File

@ -601,14 +601,14 @@ function pheromoneUtils.processPheromone(map, chunk, player)
end
end
if not player then
decayDeathGenerator(map, chunk)
end
if chunkDeath > 0 then
setDeathGenerator(map, chunk, chunkDeath * 0.95)
end
if not player then
decayDeathGenerator(map, chunk)
end
chunkPlayer = chunkPlayer * 0.45
pheromone = getPlayersOnChunk(map, chunk) * PLAYER_PHEROMONE_GENERATOR_AMOUNT
if chunkPlayer < pheromone then