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

fixed processMap and processStaticMap could index outside processQueue

length on reverse wave pass
This commit is contained in:
Aaron Veden 2021-12-31 23:52:26 -08:00
parent 8058c35a51
commit 54335c0a07
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 6 additions and 4 deletions

View File

@ -5,6 +5,10 @@ Date: 29. 12. 2021
- Set maximum value on enemy seed to 4294967295
Bugfixes:
- Fixed random generator seed overflow (Thanks NeveHanter for the report)
- Fixed removing chunks could index outside processQueueLength
- Fixed processMap and processStaticMap could index outside processQueueLength
Optimizations:
- Added early stopping to removeProcessQueueChunk
---------------------------------------------------------------------------------------------------
Version: 2.1.2

View File

@ -98,11 +98,10 @@ local next = next
pheromone dissipate at a faster rate.
--]]
function mapProcessor.processMap(map, tick)
local index = map.processIndex
local outgoingWave = map.outgoingScanWave
local processQueue = map.processQueue
local processQueueLength = #processQueue
local index = mMin(map.processIndex, processQueueLength)
local step
local endIndex
@ -139,11 +138,10 @@ function mapProcessor.processMap(map, tick)
end
function mapProcessor.processStaticMap(map)
local index = map.processStaticIndex
local outgoingWave = map.outgoingStaticScanWave
local processQueue = map.processQueue
local processQueueLength = #processQueue
local index = mMin(map.processStaticIndex, processQueueLength)
local step
local endIndex