From b99d21b818d7f76ad30e58748e60b0e6b2f41e35 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 8 Aug 2017 14:47:15 +0200 Subject: [PATCH] Add support for carrying effective owners over to husk actors --- OpenRA.Mods.Common/Traits/SpawnActorOnDeath.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/SpawnActorOnDeath.cs b/OpenRA.Mods.Common/Traits/SpawnActorOnDeath.cs index 5a93a81b97..ba9493753a 100644 --- a/OpenRA.Mods.Common/Traits/SpawnActorOnDeath.cs +++ b/OpenRA.Mods.Common/Traits/SpawnActorOnDeath.cs @@ -106,6 +106,9 @@ namespace OpenRA.Mods.Common.Traits new FactionInit(faction) }; + if (self.EffectiveOwner != null && self.EffectiveOwner.Disguised) + td.Add(new EffectiveOwnerInit(self.EffectiveOwner.Owner)); + if (Info.OwnerType == OwnerType.Victim) { // Fall back to InternalOwner if the Victim was defeated, @@ -115,7 +118,8 @@ namespace OpenRA.Mods.Common.Traits else { td.Add(new OwnerInit(self.World.Players.First(p => p.InternalName == Info.InternalOwner))); - td.Add(new EffectiveOwnerInit(self.Owner)); + if (!td.Contains()) + td.Add(new EffectiveOwnerInit(self.Owner)); } } else if (Info.OwnerType == OwnerType.Killer)