Merge pull request #2954 from Mailaender/empty-superweapon-indicators

Don't render empty remaining tick bars for iron curtain / chrono
This commit is contained in:
ScottNZ
2013-04-05 02:34:20 -07:00
2 changed files with 6 additions and 2 deletions

View File

@@ -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; }
}
}

View File

@@ -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; }
}
}