Add support for carrying effective owners over to husk actors
This commit is contained in:
@@ -106,6 +106,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
new FactionInit(faction)
|
new FactionInit(faction)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (self.EffectiveOwner != null && self.EffectiveOwner.Disguised)
|
||||||
|
td.Add(new EffectiveOwnerInit(self.EffectiveOwner.Owner));
|
||||||
|
|
||||||
if (Info.OwnerType == OwnerType.Victim)
|
if (Info.OwnerType == OwnerType.Victim)
|
||||||
{
|
{
|
||||||
// Fall back to InternalOwner if the Victim was defeated,
|
// Fall back to InternalOwner if the Victim was defeated,
|
||||||
@@ -115,7 +118,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
td.Add(new OwnerInit(self.World.Players.First(p => p.InternalName == Info.InternalOwner)));
|
td.Add(new OwnerInit(self.World.Players.First(p => p.InternalName == Info.InternalOwner)));
|
||||||
td.Add(new EffectiveOwnerInit(self.Owner));
|
if (!td.Contains<EffectiveOwnerInit>())
|
||||||
|
td.Add(new EffectiveOwnerInit(self.Owner));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Info.OwnerType == OwnerType.Killer)
|
else if (Info.OwnerType == OwnerType.Killer)
|
||||||
|
|||||||
Reference in New Issue
Block a user