Skip to content

Commit

Permalink
guard only force enable RWR if missile is seen
Browse files Browse the repository at this point in the history
  • Loading branch information
BahamutoD committed Aug 31, 2015
1 parent 7b057e0 commit 1ec9ccf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions BahaTurret/MissileFire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1521,11 +1521,6 @@ void GuardMode()
//scan and acquire new target
if(Time.time-targetScanTimer > targetScanInterval)
{
if(rwr && !rwr.rwrEnabled)
{
rwr.EnableRWR();
}

SetTarget(null);
if(BDArmorySettings.ALLOW_LEGACY_TARGETING)
{
Expand Down Expand Up @@ -1602,6 +1597,14 @@ void UpdateGuardViewScan()
guardViewScanDirection = -guardViewScanDirection;
}

if(results.foundMissile)
{
if(rwr && !rwr.rwrEnabled)
{
rwr.EnableRWR();
}
}

if(results.foundHeatMissile && !isFlaring)
{
StartCoroutine(FlareRoutine(2.5f));
Expand Down

0 comments on commit 1ec9ccf

Please sign in to comment.