diff --git a/OpenRA.Mods.RA/Chronoshiftable.cs b/OpenRA.Mods.RA/Chronoshiftable.cs index 79da3e72eb..574320ae88 100755 --- a/OpenRA.Mods.RA/Chronoshiftable.cs +++ b/OpenRA.Mods.RA/Chronoshiftable.cs @@ -82,9 +82,11 @@ namespace OpenRA.Mods.RA // Show the remaining time as a bar public float GetValue() { + if (chronoshiftReturnTicks == 0) // otherwise an empty bar is rendered all the time + return 0f; + return (float)chronoshiftReturnTicks / TotalTicks; } - public Color GetColor() { return Color.White; } } } diff --git a/OpenRA.Mods.RA/IronCurtainable.cs b/OpenRA.Mods.RA/IronCurtainable.cs index 1b64da6b79..2336db3f6f 100644 --- a/OpenRA.Mods.RA/IronCurtainable.cs +++ b/OpenRA.Mods.RA/IronCurtainable.cs @@ -45,9 +45,11 @@ namespace OpenRA.Mods.RA // Show the remaining time as a bar public float GetValue() { + if (RemainingTicks == 0) // otherwise an empty bar is rendered all the time + return 0f; + return (float)RemainingTicks / TotalTicks; } - public Color GetColor() { return Color.Red; } } } \ No newline at end of file