Optimized boarding logic. Now it works correct.

Adjust speed at the end to ensure that vehicles park closer to the cargo when carriers are in formation.
This commit is contained in:
FlightControl
2018-08-30 06:07:26 +02:00
parent 8e6fc439ec
commit 42b04dedaa
2 changed files with 33 additions and 26 deletions

View File

@@ -2062,6 +2062,8 @@ do -- Route methods
local dist=ToCoordinate:Get2DDistance(PathOnRoad[#PathOnRoad-1])
if dist>10 then
table.insert(route, ToCoordinate:WaypointGround(Speed, OffRoadFormation))
table.insert(route, ToCoordinate:GetRandomCoordinateInRadius(10,5):WaypointGround(5, OffRoadFormation))
table.insert(route, ToCoordinate:GetRandomCoordinateInRadius(10,5):WaypointGround(5, OffRoadFormation))
end
end