From 221d2d1b362110866b591dbbc549286c68ef2c2b Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Sun, 6 Jul 2003 12:53:23 +0000 Subject: [PATCH] fixed "points till next unlock" so it truly shows points till next unlock --- stepmania/src/UnlockSystem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/UnlockSystem.cpp b/stepmania/src/UnlockSystem.cpp index 7de608e354..eff7b794b0 100644 --- a/stepmania/src/UnlockSystem.cpp +++ b/stepmania/src/UnlockSystem.cpp @@ -119,10 +119,13 @@ bool UnlockSystem::LoadFromDATFile( CString sPath ) float UnlockSystem::NumPointsUntilNextUnlock() { float fSmallestPoints; - fSmallestPoints = m_SongEntries[0].m_fDancePointsRequired; + fSmallestPoints = 4000000000; // or an arbitrarily large value for( unsigned a=0; a= fSmallestPoints ) + // old line: if( m_SongEntries[a].m_fDancePointsRequired >= fSmallestPoints ) + // new: it makes sure the number of points to the song is positive, AND it is less than + // the currently smallest one. (cure) + if( m_SongEntries[a].m_fDancePointsRequired < fSmallestPoints && m_SongEntries[a].m_fDancePointsRequired > PREFSMAN->m_fDancePointsAccumulated) { fSmallestPoints = m_SongEntries[a].m_fDancePointsRequired; }