Skip to content

Commit

Permalink
Merge pull request #594 from Stephan-S/dev_axel32019
Browse files Browse the repository at this point in the history
Release 2.0.0.7
  • Loading branch information
Iwan1803 authored Jul 1, 2022
2 parents 8620f1f + 0bac376 commit 237509f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# FS22_AutoDrive
FS22 version of the AutoDrive mod

### Latest Release: 2.0.0.6
### Latest Release: 2.0.0.7
![GitHub all releases](https://img.shields.io/github/downloads/Stephan-S/FS22_AutoDrive/total?label=Downloads&style=plastic)
[Latest Release](https://github.com/Stephan-S/FS22_AutoDrive/releases/latest)
Direct Download: https://github.com/Stephan-S/FS22_AutoDrive/releases/download/2.0.0.6/FS22_AutoDrive.zip
Direct Download: https://github.com/Stephan-S/FS22_AutoDrive/releases/download/2.0.0.7/FS22_AutoDrive.zip

## Discord Server:
For help & support, feel free to join us on Discord:
Expand Down
2 changes: 1 addition & 1 deletion modDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Différents modes d'utilisation ont été ajoutés depuis les premières version
<![CDATA[Этот мод может быть использован для создания сети маршрутов для транспортных средств для автономного вождения. После настройки вы можете указать трактору, стоящему где-угодно рядом с сетью, проехать в любую точку, например, в магазин, поле №1 или в точку продажи.]]>
</ru>
</description>
<version>2.0.0.6</version>
<version>2.0.0.7</version>
<multiplayer supported="true" />
<iconFilename>icon.dds</iconFilename>
<extraSourceFiles>
Expand Down
2 changes: 1 addition & 1 deletion scripts/AutoDrive.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AutoDrive = {}
AutoDrive.version = "2.0.0.6"
AutoDrive.version = "2.0.0.7"

AutoDrive.directory = g_currentModDirectory

Expand Down
19 changes: 9 additions & 10 deletions scripts/Manager/UserDataManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,16 @@ function ADUserDataManager:saveToXml()
if g_currentMission.userManager.getUserByConnection then
local user = g_currentMission.userManager:getUserByConnection(connection)
if user == nil then
-- no client, create a single player user
-- no client, create a single player user ID
local uniqueId = ADUserDataManager.SinglePlayer
if self.users[uniqueId] == nil then
-- single player user data not loaded before, so use the current data
self.users[uniqueId] = {}
self.users[uniqueId].hudX = AutoDrive.HudX or 0.5
self.users[uniqueId].hudY = AutoDrive.HudY or 0.5
self.users[uniqueId].settings = {}
for _, sn in pairs(self.userSettingNames) do
self.users[uniqueId].settings[sn] = AutoDrive.getSettingState(sn)
end

-- single player, so use the current data
self.users[uniqueId] = {}
self.users[uniqueId].hudX = AutoDrive.HudX or 0.5
self.users[uniqueId].hudY = AutoDrive.HudY or 0.5
self.users[uniqueId].settings = {}
for _, sn in pairs(self.userSettingNames) do
self.users[uniqueId].settings[sn] = AutoDrive.getSettingState(sn)
end
end
end
Expand Down
5 changes: 4 additions & 1 deletion scripts/Utils/CollisionDetectionUtils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ function AutoDrive.checkForVehiclesInBox(boundingBox, excludedVehicles)
end
end
end

if otherVehicle.spec_conveyorBelt and otherVehicle.spec_motorized and otherVehicle.getIsMotorStarted and otherVehicle:getIsMotorStarted() then
-- ignore operating conveyor belts
isExcluded = true
end
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
local x, _, z = getWorldTranslation(otherVehicle.components[1].node)
local distance = MathUtil.vector2Length(boundingBox[1].x - x, boundingBox[1].z - z)
Expand Down

0 comments on commit 237509f

Please sign in to comment.