Ignore aircraft when searching for enemy targets.

This commit is contained in:
Paul Chote
2020-12-06 18:18:05 +00:00
committed by abcdefg30
parent 269ce9c406
commit 7c852d90fb

View File

@@ -132,7 +132,7 @@ namespace OpenRA.Mods.Common.Traits
// Use for proactive targeting.
public bool IsPreferredEnemyUnit(Actor a)
{
if (a == null || a.IsDead || Player.RelationshipWith(a.Owner) != PlayerRelationship.Enemy || a.Info.HasTraitInfo<HuskInfo>())
if (a == null || a.IsDead || Player.RelationshipWith(a.Owner) != PlayerRelationship.Enemy || a.Info.HasTraitInfo<HuskInfo>() || a.Info.HasTraitInfo<AircraftInfo>())
return false;
var targetTypes = a.GetEnabledTargetTypes();