From 4a6fefa43472ca7989dcf8ed7064fb4b97da1496 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 1 Mar 2020 20:08:16 +0000 Subject: [PATCH] Disable idle scanning on RA planes. --- OpenRA.Mods.Common/Traits/AutoTarget.cs | 5 ++++- mods/ra/rules/aircraft.yaml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index a06aa3803b..5d6542d415 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -40,6 +40,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("It will try to pivot to face the enemy if stance is not HoldFire.")] public readonly bool AllowTurning = true; + [Desc("Scan for new targets when idle.")] + public readonly bool ScanOnIdle = true; + [Desc("Set to a value >1 to override weapons maximum range for this.")] public readonly int ScanRadius = -1; @@ -269,7 +272,7 @@ namespace OpenRA.Mods.Common.Traits void INotifyIdle.TickIdle(Actor self) { - if (IsTraitDisabled || Stance < UnitStance.Defend) + if (IsTraitDisabled || !Info.ScanOnIdle || Stance < UnitStance.Defend) return; var allowMove = allowMovement && Stance > UnitStance.Defend; diff --git a/mods/ra/rules/aircraft.yaml b/mods/ra/rules/aircraft.yaml index 5f6ebc965c..13e6008604 100644 --- a/mods/ra/rules/aircraft.yaml +++ b/mods/ra/rules/aircraft.yaml @@ -120,6 +120,7 @@ MIG: RepulsionSpeed: 40 MaximumPitch: 56 AutoTarget: + ScanOnIdle: false InitialStance: HoldFire InitialStanceAI: HoldFire AmmoPool: @@ -190,6 +191,7 @@ YAK: RepulsionSpeed: 40 MaximumPitch: 56 AutoTarget: + ScanOnIdle: false InitialStance: HoldFire InitialStanceAI: HoldFire AmmoPool: