From ab6dd3dcf2870e80530db327cf32b88d23f91e17 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 25 Jan 2019 20:56:19 +0000 Subject: [PATCH] Add ForceFireIgnoresActors to AttackBase. --- OpenRA.Mods.Common/Traits/Attack/AttackBase.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 993426b046..73885892d4 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -34,6 +34,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Allow firing into the fog to target frozen actors without requiring force-fire.")] public readonly bool TargetFrozenActors = false; + [Desc("Force-fire mode ignores actors and targets the ground instead.")] + public readonly bool ForceFireIgnoresActors = false; + [VoiceReference] public readonly string Voice = "Action"; public override abstract object Create(ActorInitializer init); @@ -402,6 +405,9 @@ namespace OpenRA.Mods.Common.Traits if (modifiers.HasModifier(TargetModifiers.ForceMove)) return false; + if (ab.Info.ForceFireIgnoresActors && modifiers.HasModifier(TargetModifiers.ForceAttack)) + return false; + // Disguised actors are revealed by the attack cursor // HACK: works around limitations in the targeting code that force the // targeting and attacking logic (which should be logically separate)