1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-26 20:54:12 +02:00

refactoring scanEnemyMap to use setAreaInQuery

This commit is contained in:
Aaron Veden 2021-12-04 16:46:29 -08:00
parent 839ee4754f
commit c7850c3649
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84

View File

@ -365,9 +365,6 @@ function mapProcessor.scanEnemyMap(map, tick)
local index = map.scanEnemyIndex
local area = map.universe.area
local offset = area[2]
local chunkBox = area[1]
local processQueue = map.processQueue
local processQueueLength = #processQueue
@ -378,15 +375,7 @@ function mapProcessor.scanEnemyMap(map, tick)
end
for x=index,endIndex do
local chunk = processQueue[x]
chunkBox[1] = chunk.x
chunkBox[2] = chunk.y
offset[1] = chunk.x + CHUNK_SIZE
offset[2] = chunk.y + CHUNK_SIZE
mapScanEnemyChunk(chunk, map, tick)
mapScanEnemyChunk(processQueue[x], map, tick)
end
if (endIndex == processQueueLength) then