clamp percent before displaying

This commit is contained in:
Chris Danford
2004-01-25 05:34:23 +00:00
parent 76ba28e274
commit ebb7c2b81e
+4
View File
@@ -70,6 +70,10 @@ void PercentageDisplay::Refresh()
if( !PREFSMAN->m_bDancePointsForOni )
{
float fPercentDancePoints = g_CurStageStats.GetPercentDancePoints( m_PlayerNumber );
// clamp percentage - feedback is that negative numbers look weird here.
CLAMP( fPercentDancePoints, 0.f, 1.f );
if( PERCENT_USE_REMAINDER )
{
int iPercentWhole = int(fPercentDancePoints*100);