From 8d5ed65feba20f182d882b9d05431ed20d40c6c9 Mon Sep 17 00:00:00 2001 From: Curtis Shmyr Date: Fri, 9 Oct 2020 18:13:00 -0600 Subject: [PATCH] Remove effective owner check when choosing armament --- OpenRA.Mods.Common/Traits/Attack/AttackBase.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 92d4124283..6e43018a55 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -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()) - owner = t.Actor.Owner; - } + owner = t.Actor.Owner; return Armaments.Where(a => !a.IsTraitDisabled