diff --git a/CHANGELOG b/CHANGELOG index d21165516a..980a2704ae 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -66,6 +66,7 @@ NEW: Removed the submarine detection ability from Cruiser and Transport. Added the submarine detection ability to Submarines and Missile Subs. Increased the submarine detection range of Gunboat from 3 to 4. + Fixed Spies having an enemy color health bar when disguised as a friendly unit (occurred using the Team Health Colors setting). Tiberian Dawn: Chinook rotors now counter-rotate. Commando can now plant C4 on bridges. diff --git a/OpenRA.Game/Traits/Selectable.cs b/OpenRA.Game/Traits/Selectable.cs index 4d19bcb8a2..80dfa10f15 100644 --- a/OpenRA.Game/Traits/Selectable.cs +++ b/OpenRA.Game/Traits/Selectable.cs @@ -181,8 +181,11 @@ namespace OpenRA.Traits Color GetHealthColor(Health health) { if (Game.Settings.Game.TeamHealthColors) - return self.Owner.IsAlliedWith(self.World.LocalPlayer) ? Color.LimeGreen : - self.Owner.NonCombatant ? Color.Tan : Color.Red; + { + var isAlly = self.Owner.IsAlliedWith(self.World.LocalPlayer) + || (self.IsDisguised() && self.World.LocalPlayer.IsAlliedWith(self.EffectiveOwner.Owner)); + return isAlly ? Color.LimeGreen : self.Owner.NonCombatant ? Color.Tan : Color.Red; + } else return health.DamageState == DamageState.Critical ? Color.Red : health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;