fix(marker): væk sovende køretøjer ved AD-start og under opfølgning (v1.21.6.0)
In-game 25/9: Fastrac'en stod stille ved AutoDrive-start til spilleren satte sig ind (parkerede køretøjer kalder ikke onUpdate). Samme greb som flows' applyAndStart + raiseActive fra AI-Bonden.
This commit is contained in:
@@ -122,6 +122,16 @@ local function stopAd(vehicle)
|
|||||||
if isAdActive(vehicle) then vehicle:stopAutoDrive() end
|
if isAdActive(vehicle) then vehicle:stopAutoDrive() end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Parkerede køretøjer SOVER i FS25 (motoren kalder ikke onUpdate), så AutoDrives køreopgave står stille,
|
||||||
|
-- til nogen vækker dem (in-game 25/9: Fastrac'en kørte først, da spilleren satte sig ind). Samme greb
|
||||||
|
-- som flows (applyAndStart) + raiseActive, bevist i AI-Bonden.
|
||||||
|
local function wake(vehicle, kick)
|
||||||
|
if vehicle.raiseActive ~= nil then vehicle:raiseActive() end
|
||||||
|
if kick and vehicle.isServer and SpecializationUtil ~= nil and SpecializationUtil.raiseEvent ~= nil then
|
||||||
|
SpecializationUtil.raiseEvent(vehicle, "onUpdate", 16, false, false, false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function startAd(adEnv, vehicle, mode, firstId, secondId, withCp)
|
local function startAd(adEnv, vehicle, mode, firstId, secondId, withCp)
|
||||||
local module = stateModule(vehicle)
|
local module = stateModule(vehicle)
|
||||||
stopAd(vehicle)
|
stopAd(vehicle)
|
||||||
@@ -145,6 +155,7 @@ local function startAd(adEnv, vehicle, mode, firstId, secondId, withCp)
|
|||||||
else
|
else
|
||||||
vehicle:startAutoDrive()
|
vehicle:startAutoDrive()
|
||||||
end
|
end
|
||||||
|
wake(vehicle, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parkMarkerId(adEnv, vehicle)
|
local function parkMarkerId(adEnv, vehicle)
|
||||||
@@ -310,6 +321,8 @@ local function follow(adEnv, assignment)
|
|||||||
end
|
end
|
||||||
local field = ADFieldJobs.getField(assignment.fieldId)
|
local field = ADFieldJobs.getField(assignment.fieldId)
|
||||||
local info = ADFields.getInfo(assignment.fieldId)
|
local info = ADFields.getInfo(assignment.fieldId)
|
||||||
|
-- hold sættet vågent mens vi har det (AutoDrive-kørsel, CP-start, arbejde, AD-aflæsning)
|
||||||
|
wake(vehicle)
|
||||||
if assignment.phase == "driving" then
|
if assignment.phase == "driving" then
|
||||||
if not isAdActive(vehicle) and ADFieldJobs.now - assignment.since > 2000 then
|
if not isAdActive(vehicle) and ADFieldJobs.now - assignment.since > 2000 then
|
||||||
local x, z = vehiclePosition(vehicle)
|
local x, z = vehiclePosition(vehicle)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<modDesc descVersion="107">
|
<modDesc descVersion="107">
|
||||||
<author>masterdraco</author>
|
<author>masterdraco</author>
|
||||||
<version>1.21.5.0</version>
|
<version>1.21.6.0</version>
|
||||||
<title>
|
<title>
|
||||||
<en>AD Smart Pickup</en>
|
<en>AD Smart Pickup</en>
|
||||||
</title>
|
</title>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# AD Smart Pickup — brugermanual
|
# AD Smart Pickup — brugermanual
|
||||||
|
|
||||||
Version 1.21.5 · Farming Simulator 25 · tillæg til AutoDrive
|
Version 1.21.6 · Farming Simulator 25 · tillæg til AutoDrive
|
||||||
|
|
||||||
*English version: [USER_MANUAL.md](USER_MANUAL.md)*
|
*English version: [USER_MANUAL.md](USER_MANUAL.md)*
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# AD Smart Pickup — user manual
|
# AD Smart Pickup — user manual
|
||||||
|
|
||||||
Version 1.21.5 · Farming Simulator 25 · add-on for AutoDrive
|
Version 1.21.6 · Farming Simulator 25 · add-on for AutoDrive
|
||||||
|
|
||||||
*Dansk version: [BRUGERMANUAL.md](BRUGERMANUAL.md)*
|
*Dansk version: [BRUGERMANUAL.md](BRUGERMANUAL.md)*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user