Altitude was wrongly set in patrol

This commit is contained in:
FlightControl
2017-06-14 14:34:55 +02:00
parent fb54b2f280
commit a646dd900d
2 changed files with 1 additions and 3 deletions

View File

@@ -347,6 +347,7 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
local CurrentCoord = AIGroup:GetCoordinate()
local ToTargetCoord = self.PatrolZone:GetRandomPointVec2()
ToTargetCoord:SetAlt(math.random( self.PatrolFloorAltitude,self.PatrolCeilingAltitude ) )
self:SetTargetDistance( ToTargetCoord ) -- For RTB status check
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )