Remove player colors from healthbars

This commit is contained in:
Gustas
2023-02-20 17:37:59 +02:00
committed by Matthias Mailänder
parent 34262fb33c
commit 2f331548e1
2 changed files with 3 additions and 9 deletions

View File

@@ -124,11 +124,8 @@ namespace OpenRA.Mods.Common.Graphics
}
}
Color GetHealthColor(IHealth health)
static Color GetHealthColor(IHealth health)
{
if (Game.Settings.Game.UsePlayerStanceColors)
return Player.PlayerRelationshipColor(actor);
return health.DamageState == DamageState.Critical ? Color.Red :
health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;
}

View File

@@ -81,16 +81,13 @@ namespace OpenRA.Mods.Common.Graphics
cr.DrawLine(start + r, z + r, 1, barColor2);
}
Color GetHealthColor(IHealth health)
static Color GetHealthColor(IHealth health)
{
if (Game.Settings.Game.UsePlayerStanceColors)
return Player.PlayerRelationshipColor(actor);
return health.DamageState == DamageState.Critical ? Color.Red :
health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;
}
void DrawHealthBar(IHealth health, float2 start, float2 end)
static void DrawHealthBar(IHealth health, float2 start, float2 end)
{
if (health == null || health.IsDead)
return;