Skip to content

Commit

Permalink
Band aid for #1329, as ad changed something and isn't willing to fix …
Browse files Browse the repository at this point in the history
…this...
  • Loading branch information
schwiti6190 committed Apr 7, 2022
1 parent 9ac91df commit 79a278d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/specializations/CpAIFieldWorker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function CpAIFieldWorker:startCpAtFirstWp()
if self:hasCpCourse() and self:getCanStartCpFieldWork() then
spec.cpJobStartAtFirstWp:applyCurrentState(self, g_currentMission, g_currentMission.player.farmId, true)
--- Applies the lane offset set in the hud, so ad can start with the correct lane offset.
spec.cpJobStartAtFirstWp:getCpJobParameters().laneOffset:setValue(spec.cpJob:getCpJobParameters().laneOffset:getValue())
spec.cpJobStartAtFirstWp:getCpJobParameters().laneOffset:setValue(self:getCpLaneOffsetSetting():getValue())
spec.cpJobStartAtFirstWp:setValues()
local success = spec.cpJobStartAtFirstWp:validate(false)
if success then
Expand All @@ -217,6 +217,9 @@ function CpAIFieldWorker:startCpAtLastWp()
self:updateAIFieldWorkerImplementData()
if self:hasCpCourse() and self:getCanStartCpFieldWork() then
spec.cpJobStartAtLastWp:applyCurrentState(self, g_currentMission, g_currentMission.player.farmId, true)
--- Applies the lane offset set in the hud, so ad can start with the correct lane offset.
--- TODO: This should only be applied, if the driver was started for the first time by ad and not every time.
spec.cpJobStartAtLastWp:getCpJobParameters().laneOffset:setValue(self:getCpLaneOffsetSetting():getValue())
spec.cpJobStartAtLastWp:setValues()
local success = spec.cpJobStartAtLastWp:validate(false)
if success then
Expand Down

0 comments on commit 79a278d

Please sign in to comment.