Skip to content

Commit

Permalink
Plow rotation typo for course turn fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pvaiko committed Dec 29, 2021
1 parent 1b05b6c commit 9cc47f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/ai/turns/AITurn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ function CourseTurn:endTurn(dt)
end

function CourseTurn:updateTurnProgress()
local progress = self.turnCourse:getCurrentWaypointIx() / #self.turnCourse
self.vehicle:raiseAIEvent("onAIFieldWorkerTurnProgress", "onAIImplementTurnProgress", progress, self.turnContext:isLeftTurn())
if self.turnCourse then
local progress = self.turnCourse:getCurrentWaypointIx() / self.turnCourse:getNumberOfWaypoints()
self.vehicle:raiseAIEvent("onAIFieldWorkerTurnProgress", "onAIImplementTurnProgress", progress, self.turnContext:isLeftTurn())
end
end

function CourseTurn:onWaypointChange(ix)
Expand Down

0 comments on commit 9cc47f0

Please sign in to comment.