diff --git a/OpenRA.Mods.RA/Traits/Disguise.cs b/OpenRA.Mods.RA/Traits/Disguise.cs index fcd2b9c1ab..0a4f9f6bd4 100644 --- a/OpenRA.Mods.RA/Traits/Disguise.cs +++ b/OpenRA.Mods.RA/Traits/Disguise.cs @@ -112,10 +112,22 @@ namespace OpenRA.Mods.RA.Traits if (target != null) { - var tooltip = target.TraitsImplementing().FirstOrDefault(); - AsTooltipInfo = tooltip.TooltipInfo; - AsPlayer = tooltip.Owner; - AsSprite = target.Trait().GetImage(target); + // Take the image of the target's disguise, if it exist. + // E.g., SpyA is disguised as a dog. SpyB then targets SpyA. We should use the dog image. + var targetDisguise = target.TraitOrDefault(); + if (targetDisguise != null && targetDisguise.Disguised) + { + AsSprite = targetDisguise.AsSprite; + AsPlayer = targetDisguise.AsPlayer; + AsTooltipInfo = targetDisguise.AsTooltipInfo; + } + else + { + AsSprite = target.Trait().GetImage(target); + var tooltip = target.TraitsImplementing().FirstOrDefault(); + AsPlayer = tooltip.Owner; + AsTooltipInfo = tooltip.TooltipInfo; + } } else {