1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-10 14:25:59 +00:00

Fixed sortCoords for draw functions (#749)

This commit is contained in:
lily
2021-04-02 10:30:28 -04:00
committed by Jummit
parent 3a7470a108
commit 558976e4ca
2 changed files with 24 additions and 1 deletions

View File

@@ -132,7 +132,17 @@ function drawLine(startX, startY, endX, endY, colour)
return
end
local minX, maxX, minY, maxY = sortCoords(startX, startY, endX, endY)
local minX = math.min(startX, endX)
local maxX, minY, maxY
if minX == startX then
minY = startY
maxX = endX
maxY = endY
else
minY = endY
maxX = startX
maxY = startY
end
-- TODO: clip to screen rectangle?