Skip to content

Commit 237509f

Browse files
authored
Merge pull request #594 from Stephan-S/dev_axel32019
Release 2.0.0.7
2 parents 8620f1f + 0bac376 commit 237509f

5 files changed

Lines changed: 17 additions & 15 deletions

File tree

README.md

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

4-
### Latest Release: 2.0.0.6
4+
### Latest Release: 2.0.0.7
55
![GitHub all releases](https://img.shields.io/github/downloads/Stephan-S/FS22_AutoDrive/total?label=Downloads&style=plastic)
66
[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.0.6/FS22_AutoDrive.zip
7+
Direct Download: https://github.com/Stephan-S/FS22_AutoDrive/releases/download/2.0.0.7/FS22_AutoDrive.zip
88

99
## Discord Server:
1010
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.0.6</version>
35+
<version>2.0.0.7</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.0.6"
2+
AutoDrive.version = "2.0.0.7"
33

44
AutoDrive.directory = g_currentModDirectory
55

scripts/Manager/UserDataManager.lua

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,16 @@ function ADUserDataManager:saveToXml()
9393
if g_currentMission.userManager.getUserByConnection then
9494
local user = g_currentMission.userManager:getUserByConnection(connection)
9595
if user == nil then
96-
-- no client, create a single player user
96+
-- no client, create a single player user ID
9797
local uniqueId = ADUserDataManager.SinglePlayer
98-
if self.users[uniqueId] == nil then
99-
-- single player user data not loaded before, so use the current data
100-
self.users[uniqueId] = {}
101-
self.users[uniqueId].hudX = AutoDrive.HudX or 0.5
102-
self.users[uniqueId].hudY = AutoDrive.HudY or 0.5
103-
self.users[uniqueId].settings = {}
104-
for _, sn in pairs(self.userSettingNames) do
105-
self.users[uniqueId].settings[sn] = AutoDrive.getSettingState(sn)
106-
end
98+
99+
-- single player, so use the current data
100+
self.users[uniqueId] = {}
101+
self.users[uniqueId].hudX = AutoDrive.HudX or 0.5
102+
self.users[uniqueId].hudY = AutoDrive.HudY or 0.5
103+
self.users[uniqueId].settings = {}
104+
for _, sn in pairs(self.userSettingNames) do
105+
self.users[uniqueId].settings[sn] = AutoDrive.getSettingState(sn)
107106
end
108107
end
109108
end

scripts/Utils/CollisionDetectionUtils.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ function AutoDrive.checkForVehiclesInBox(boundingBox, excludedVehicles)
1616
end
1717
end
1818
end
19-
19+
if otherVehicle.spec_conveyorBelt and otherVehicle.spec_motorized and otherVehicle.getIsMotorStarted and otherVehicle:getIsMotorStarted() then
20+
-- ignore operating conveyor belts
21+
isExcluded = true
22+
end
2023
if (not isExcluded) and otherVehicle ~= nil and otherVehicle.components ~= nil and otherVehicle.size.width ~= nil and otherVehicle.size.length ~= nil and otherVehicle.rootNode ~= nil then
2124
local x, _, z = getWorldTranslation(otherVehicle.components[1].node)
2225
local distance = MathUtil.vector2Length(boundingBox[1].x - x, boundingBox[1].z - z)

0 commit comments

Comments
 (0)