mirror of
https://github.com/veden/Rampant.git
synced 2025-04-07 06:59:59 +02:00
FACTO-170: Death generator not being rounded to nil once it reach less
than 0.001
This commit is contained in:
parent
3dabae1057
commit
602f75ffa1
@ -6,6 +6,7 @@ Version: 3.1.2
|
|||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Fixed sent aggressive squads count could be negative
|
- Fixed sent aggressive squads count could be negative
|
||||||
- Added missing sent and max siege groups on debug log
|
- Added missing sent and max siege groups on debug log
|
||||||
|
- Fixed small amounts of death generator not being rounded to nil
|
||||||
Framework:
|
Framework:
|
||||||
- Updated visualizer tool for debugging
|
- Updated visualizer tool for debugging
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ function chunkPropertyUtils.addDeathGenerator(map, chunk, value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function chunkPropertyUtils.setDeathGenerator(map, chunk, value)
|
function chunkPropertyUtils.setDeathGenerator(map, chunk, value)
|
||||||
if (value <= 0) then
|
if (value <= 0.001) then
|
||||||
map.chunkToDeathGenerator[chunk.id] = nil
|
map.chunkToDeathGenerator[chunk.id] = nil
|
||||||
else
|
else
|
||||||
map.chunkToDeathGenerator[chunk.id] = value
|
map.chunkToDeathGenerator[chunk.id] = value
|
||||||
|
@ -601,14 +601,14 @@ function pheromoneUtils.processPheromone(map, chunk, player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not player then
|
|
||||||
decayDeathGenerator(map, chunk)
|
|
||||||
end
|
|
||||||
|
|
||||||
if chunkDeath > 0 then
|
if chunkDeath > 0 then
|
||||||
setDeathGenerator(map, chunk, chunkDeath * 0.95)
|
setDeathGenerator(map, chunk, chunkDeath * 0.95)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not player then
|
||||||
|
decayDeathGenerator(map, chunk)
|
||||||
|
end
|
||||||
|
|
||||||
chunkPlayer = chunkPlayer * 0.45
|
chunkPlayer = chunkPlayer * 0.45
|
||||||
pheromone = getPlayersOnChunk(map, chunk) * PLAYER_PHEROMONE_GENERATOR_AMOUNT
|
pheromone = getPlayersOnChunk(map, chunk) * PLAYER_PHEROMONE_GENERATOR_AMOUNT
|
||||||
if chunkPlayer < pheromone then
|
if chunkPlayer < pheromone then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user