Remove effective owner check when choosing armament

This commit is contained in:
Curtis Shmyr
2020-10-09 18:13:00 -06:00
committed by abcdefg30
parent a375f0e58a
commit 8d5ed65feb

View File

@@ -371,20 +371,9 @@ namespace OpenRA.Mods.Common.Traits
// (short-circuiting in the logical expression below)
Player owner = null;
if (t.Type == TargetType.FrozenActor)
{
owner = t.FrozenActor.Owner;
}
else if (t.Type == TargetType.Actor)
{
owner = t.Actor.EffectiveOwner != null && t.Actor.EffectiveOwner.Owner != null
? t.Actor.EffectiveOwner.Owner
: t.Actor.Owner;
// Special cases for spies so we don't kill friendly disguised spies
// and enable dogs to kill enemy disguised spies.
if (self.Owner.Stances[t.Actor.Owner] == Stance.Ally || self.Info.HasTraitInfo<IgnoresDisguiseInfo>())
owner = t.Actor.Owner;
}
owner = t.Actor.Owner;
return Armaments.Where(a =>
!a.IsTraitDisabled