fix adjusting select to camera
This commit is contained in:
parent
ba1c0f0c89
commit
9c4b5431ee
@ -21,9 +21,10 @@ function deselectSpawns()
|
||||
end
|
||||
|
||||
function selectSpawns(rect)
|
||||
local select_rect = rect:clone()
|
||||
select_rect:fix()
|
||||
|
||||
local x, y = rect:getPoints()
|
||||
local select_rect = Rect:fromPoints(x-{x=Camera.pos.x,y=Camera.pos.y},y-{x=Camera.pos.x,y=Camera.pos.y})
|
||||
select_rect:fix()
|
||||
|
||||
for _, spawn in pairs(LoadedObjects.Spawns) do
|
||||
|
||||
local offset_x, offset_y = spawn.archetype.display:getCenteredOffset()
|
||||
|
Loading…
Reference in New Issue
Block a user