Skip to content

Commit 1eb6f65

Browse files
authored
Merge pull request #975 from Stephan-S/dev-iwan
AutoDrive 2.0.1.4
2 parents e9084e7 + 4a98bbf commit 1eb6f65

16 files changed

Lines changed: 164 additions & 166 deletions

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# FS22_AutoDrive
22
FS22 version of the AutoDrive mod
33

4-
### Latest Release: 2.0.1.2
4+
### Latest Release: 2.0.1.4
55
![GitHub all releases](https://img.shields.io/github/downloads/Stephan-S/FS22_AutoDrive/total?label=Downloads&style=plastic)
6-
[Latest Release](https://github.com/Stephan-S/FS22_AutoDrive/releases/latest)
7-
Direct Download: https://github.com/Stephan-S/FS22_AutoDrive/releases/download/2.0.1.2/FS22_AutoDrive.zip
6+
Direct Download: https://github.com/Stephan-S/FS22_AutoDrive/releases/latest/download/FS22_AutoDrive.zip
87

98
## Discord Server:
109
For help & support, feel free to join us on Discord:

modDesc.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Différents modes d'utilisation ont été ajoutés depuis les premières version
3232
<![CDATA[Этот мод может быть использован для создания сети маршрутов для транспортных средств для автономного вождения. После настройки вы можете указать трактору, стоящему где-угодно рядом с сетью, проехать в любую точку, например, в магазин, поле №1 или в точку продажи.]]>
3333
</ru>
3434
</description>
35-
<version>2.0.1.2</version>
35+
<version>2.0.1.4</version>
3636
<multiplayer supported="true" />
3737
<iconFilename>icon.dds</iconFilename>
3838
<extraSourceFiles>

scripts/AutoDrive.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AutoDrive = {}
2-
AutoDrive.version = "2.0.1.2"
2+
AutoDrive.version = "2.0.1.4"
33

44
AutoDrive.directory = g_currentModDirectory
55

scripts/Manager/DrawingManager.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,18 @@ function ADDrawingManager.initObject(id)
8787
return itemId
8888
end
8989

90-
function ADDrawingManager:addLineTask(sx, sy, sz, ex, ey, ez, r, g, b)
90+
function ADDrawingManager:addLineTask(sx, sy, sz, ex, ey, ez, scale, r, g, b)
9191
-- storing task
9292
local hash = 0
9393
-- local hash = string.format("l%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.2f%.1f", sx, sy, sz, ex, ey, ez, r, g, b, self.yOffset)
94-
table.insert(self.lines.tasks, {sx = sx, sy = sy, sz = sz, ex = ex, ey = ey, ez = ez, r = r, g = g, b = b, hash = hash})
94+
table.insert(self.lines.tasks, {sx = sx, sy = sy, sz = sz, ex = ex, ey = ey, ez = ez, scale = scale, r = r, g = g, b = b, hash = hash})
9595
end
9696

97-
function ADDrawingManager:addArrowTask(sx, sy, sz, ex, ey, ez, position, r, g, b)
97+
function ADDrawingManager:addArrowTask(sx, sy, sz, ex, ey, ez, scale, position, r, g, b)
9898
-- storing task
9999
local hash = 0
100100
-- local hash = string.format("a%.2f%.2f%.2f%.2f%.2f%.2f%d%.2f%.2f%.2f%.1f", sx, sy, sz, ex, ey, ez, position, r, g, b, self.yOffset)
101-
table.insert(self.arrows.tasks, {sx = sx, sy = sy, sz = sz, ex = ex, ey = ey, ez = ez, r = r, g = g, b = b, position = position, hash = hash})
101+
table.insert(self.arrows.tasks, {sx = sx, sy = sy, sz = sz, ex = ex, ey = ey, ez = ez, scale = scale, r = r, g = g, b = b, position = position, hash = hash})
102102
end
103103

104104
function ADDrawingManager:addSmallSphereTask(x, y, z, r, g, b)
@@ -115,11 +115,11 @@ function ADDrawingManager:addMarkerTask(x, y, z)
115115
table.insert(self.markers.tasks, {x = x, y = y, z = z, hash = hash})
116116
end
117117

118-
function ADDrawingManager:addCrossTask(x, y, z)
118+
function ADDrawingManager:addCrossTask(x, y, z, scale)
119119
-- storing task
120120
local hash = 0
121121
-- local hash = string.format("c%.2f%.2f%.2f%.1f", x, y, z, self.yOffset)
122-
table.insert(self.cross.tasks, {x = x, y = y, z = z, hash = hash})
122+
table.insert(self.cross.tasks, {x = x, y = y, z = z, scale = scale, hash = hash})
123123
end
124124

125125
function ADDrawingManager:addSphereTask(x, y, z, scale, r, g, b, a)
@@ -348,7 +348,7 @@ function ADDrawingManager:drawLine(id, task)
348348

349349
setTranslation(id, task.sx, task.sy + self.yOffset, task.sz)
350350

351-
local scaleLines = AutoDrive.getSetting("scaleLines") or 1
351+
local scaleLines = (AutoDrive.getSetting("scaleLines") or 1) * (task.scale or 1)
352352
setScale(id, scaleLines, scaleLines, distToNextPoint)
353353

354354
-- Set the direction of the line
@@ -387,7 +387,7 @@ function ADDrawingManager:drawArrow(id, task)
387387

388388
setTranslation(id, x, y + self.yOffset, z)
389389

390-
local scaleLines = AutoDrive.getSetting("scaleLines") or 1
390+
local scaleLines = (AutoDrive.getSetting("scaleLines") or 1) * (task.scale or 1)
391391
setScale(id, scaleLines, scaleLines, scaleLines)
392392

393393
-- Set the direction of the arrow
@@ -413,7 +413,7 @@ end
413413

414414
function ADDrawingManager:drawCross(id, task)
415415
setTranslation(id, task.x, task.y + self.yOffset, task.z)
416-
local scaleLines = AutoDrive.getSetting("scaleLines") or 1
416+
local scaleLines = (AutoDrive.getSetting("scaleLines") or 1) * (task.scale or 1)
417417
setScale(id, scaleLines, scaleLines, scaleLines)
418418
setVisibility(id, true)
419419
end

scripts/Modules/DrivePathModule.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ function ADDrivePathModule:followWaypoints(dt)
312312

313313
--print("Speed: " .. (self.vehicle.lastSpeedReal * 3600) .. "/" .. self.speedLimit .. " acc: " .. self.acceleration .. " maxSpeedDiff: " .. maxSpeedDiff)
314314
--print("LAD: " .. self.distanceToLookAhead .. " maxAngle: " .. self.maxAngle .. " maxAngleSpeed: " .. self.maxAngleSpeed)
315-
--ADDrawingManager:addLineTask(x, y, z, self.targetX, y, self.targetZ, 1, 0, 0)
315+
--ADDrawingManager:addLineTask(x, y, z, self.targetX, y, self.targetZ, 1, 1, 0, 0)
316316
if self.vehicle.startMotor then
317317
if not self.vehicle:getIsMotorStarted() and self.vehicle:getCanMotorRun() and not self.vehicle.ad.specialDrivingModule:shouldStopMotor() then
318318
self.vehicle:startMotor()

0 commit comments

Comments
 (0)