Skip to content

Commit 7c64527

Browse files
author
Peter Vaiko
committed
raise start event after updateAIFieldWorkerImplementData
1 parent 4f4f0e9 commit 7c64527

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/ai/tasks/CpAITaskFieldWork.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ function CpAITaskFieldWork:start()
6464
self:debug("Field work task started.")
6565
local spec = self.vehicle.spec_aiFieldWorker
6666
spec.isActive = true
67-
self.vehicle:raiseAIEvent("onAIFieldWorkerStart", "onAIImplementStart")
6867
if self.isServer then
6968
self.vehicle:updateAIFieldWorkerImplementData()
70-
if self.vehicle:getAINeedsTrafficCollisionBox() and (AIFieldWorker.TRAFFIC_COLLISION ~= nil and
69+
if self.vehicle:getAINeedsTrafficCollisionBox() and (AIFieldWorker.TRAFFIC_COLLISION ~= nil and
7170
(AIFieldWorker.TRAFFIC_COLLISION ~= 0 and spec.aiTrafficCollision == nil)) then
7271

7372
spec.aiTrafficCollision = clone(AIFieldWorker.TRAFFIC_COLLISION, true, false, true)
7473
end
74+
self.vehicle:raiseAIEvent("onAIFieldWorkerStart", "onAIImplementStart")
7575
local cpSpec = self.vehicle.spec_cpAIFieldWorker
7676
--- Remembers the last lane offset setting value that was used.
7777
cpSpec.cpJobStartAtLastWp:getCpJobParameters().laneOffset:setValue(self.job:getCpJobParameters().laneOffset:getValue())

0 commit comments

Comments
 (0)