From 18f45fd7996b92ea9038fc008b942ab95b5955f2 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Sun, 24 Aug 2003 21:39:47 +0000 Subject: [PATCH] fix score updating after a player fails (amount of update is so small that it wouldn't add) --- stepmania/src/ScoreDisplayNormal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScoreDisplayNormal.cpp b/stepmania/src/ScoreDisplayNormal.cpp index c83857732f..bcc23703cc 100644 --- a/stepmania/src/ScoreDisplayNormal.cpp +++ b/stepmania/src/ScoreDisplayNormal.cpp @@ -70,8 +70,12 @@ void ScoreDisplayNormal::Update( float fDeltaTime ) if( m_iTrailingScore != m_iScore ) { + // adjust for when player fails + int increment = int(m_iScoreVelocity * fDeltaTime); + if (m_iScoreVelocity != 0 && increment == 0) increment = 1; + int iDeltaBefore = m_iScore - m_iTrailingScore; - m_iTrailingScore += int(m_iScoreVelocity * fDeltaTime); + m_iTrailingScore += increment; int iDeltaAfter = m_iScore - m_iTrailingScore; if( (iDeltaBefore < 0 && iDeltaAfter > 0) ||