From c7850c3649e1aa2a22a487509f9844efa2684c23 Mon Sep 17 00:00:00 2001 From: Aaron Veden Date: Sat, 4 Dec 2021 16:46:29 -0800 Subject: [PATCH] refactoring scanEnemyMap to use setAreaInQuery --- libs/MapProcessor.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libs/MapProcessor.lua b/libs/MapProcessor.lua index d5b1e2a..8825078 100644 --- a/libs/MapProcessor.lua +++ b/libs/MapProcessor.lua @@ -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