don't render empty remaining tick bars for iron curtain / chrono
This commit is contained in:
@@ -82,9 +82,11 @@ namespace OpenRA.Mods.RA
|
|||||||
// Show the remaining time as a bar
|
// Show the remaining time as a bar
|
||||||
public float GetValue()
|
public float GetValue()
|
||||||
{
|
{
|
||||||
|
if (chronoshiftReturnTicks == 0) // otherwise an empty bar is rendered all the time
|
||||||
|
return 0f;
|
||||||
|
|
||||||
return (float)chronoshiftReturnTicks / TotalTicks;
|
return (float)chronoshiftReturnTicks / TotalTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color GetColor() { return Color.White; }
|
public Color GetColor() { return Color.White; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,9 +45,11 @@ namespace OpenRA.Mods.RA
|
|||||||
// Show the remaining time as a bar
|
// Show the remaining time as a bar
|
||||||
public float GetValue()
|
public float GetValue()
|
||||||
{
|
{
|
||||||
|
if (RemainingTicks == 0) // otherwise an empty bar is rendered all the time
|
||||||
|
return 0f;
|
||||||
|
|
||||||
return (float)RemainingTicks / TotalTicks;
|
return (float)RemainingTicks / TotalTicks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color GetColor() { return Color.Red; }
|
public Color GetColor() { return Color.Red; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user