This commit is contained in:
FlightControl
2017-06-08 15:44:35 +02:00
parent 18885f0450
commit e17de754a3
7 changed files with 58 additions and 89 deletions

View File

@@ -434,6 +434,8 @@ end
function AI_A2A:onafterRTB( AIGroup, From, Event, To )
self:F( { AIGroup, From, Event, To } )
self:E( "Group " .. self.Controllable:GetName() .. " ... RTB! ( " .. self:GetState() .. " )" )
if AIGroup and AIGroup:IsAlive() then
self.CheckStatus = false
@@ -446,7 +448,7 @@ function AI_A2A:onafterRTB( AIGroup, From, Event, To )
local CurrentCoord = AIGroup:GetCoordinate()
local ToTargetCoord = self.HomeAirbase:GetCoordinate()
local ToTargetSpeed = math.random( self.MinSpeed, self.MaxSpeed )
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
local ToInterceptAngle = CurrentCoord:GetAngleDegrees( CurrentCoord:GetDirectionVec3( ToTargetCoord ) )
local Distance = CurrentCoord:Get2DDistance( ToTargetCoord )