From ebb7c2b81e13f008316685e78b01ce5279c9df68 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 25 Jan 2004 05:34:23 +0000 Subject: [PATCH] clamp percent before displaying --- stepmania/src/PercentageDisplay.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stepmania/src/PercentageDisplay.cpp b/stepmania/src/PercentageDisplay.cpp index 2dd6ecbb0e..1135e73936 100644 --- a/stepmania/src/PercentageDisplay.cpp +++ b/stepmania/src/PercentageDisplay.cpp @@ -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);