Skip to content

Commit

Permalink
Stupid map fix ..
Browse files Browse the repository at this point in the history
schwiti6190 committed Dec 6, 2024
1 parent 0464112 commit 13852fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/gui/CoursePlot.lua
Original file line number Diff line number Diff line change
@@ -114,7 +114,11 @@ function CoursePlot:drawLineBetween(map, x, z, nx, nz, isHudMap, lineThickness,
local endX, endY, _, ev = CpGuiUtil.worldToScreen(map, nx, nz, isHudMap)
local dx, dz = nx - x, nz - z
local length = MathUtil.vector2Length(dx, dz)
local dirX, dirZ = length > 0 and MathUtil.vector2Normalize(dx, dz) or 0, 1
local dirX, dirZ = 0, 1
if length <= 0 then
return
end
dirX, dirZ = MathUtil.vector2Normalize(dx, dz)
if startX and startY and endX and endY then
local dx2D = endX - startX
local dy2D = ( endY - startY ) / g_screenAspectRatio

0 comments on commit 13852fa

Please sign in to comment.