This commit is contained in:
FlightControl 2018-12-17 20:59:58 +01:00
parent cfc9c655c5
commit 6c4bde4ceb
2 changed files with 4 additions and 2 deletions

View File

@ -61,7 +61,7 @@ function AI_A2G:New( AIGroup )
local self = BASE:Inherit( self, AI_AIR:New( AIGroup ) ) -- #AI_A2G
self:SetFuelThreshold( .2, 60 )
self:SetDamageThreshold( 0.4 )
self:SetDamageThreshold( 0.95 )
self:SetDisengageRadius( 70000 )
return self

View File

@ -98,8 +98,10 @@ function AI_A2G_CAS:onafterEngage( DefenderGroup, From, Event, To, AttackSetUnit
local FromEngageAngle = ToCoord:GetAngleDegrees( ToCoord:GetDirectionVec3( DefenderCoord ) )
local EngageDistance = ( DefenderGroup:IsHelicopter() and 5000 ) or ( DefenderGroup:IsAirPlane() and 10000 )
--- Create a route point of type air.
local ToWP = ToCoord:Translate( 10000, FromEngageAngle ):WaypointAir(
local ToWP = ToCoord:Translate( EngageDistance, FromEngageAngle ):WaypointAir(
self.PatrolAltType,
POINT_VEC3.RoutePointType.TurningPoint,
POINT_VEC3.RoutePointAction.TurningPoint,