Add ForceFireIgnoresActors to AttackBase.

This commit is contained in:
Paul Chote
2019-01-25 20:56:19 +00:00
committed by reaperrr
parent a2e35144a7
commit ab6dd3dcf2

View File

@@ -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)