From 3c572b29cb52495b54aef721a0a4be8630f4f96a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 7 Feb 2003 23:49:07 +0000 Subject: [PATCH] keep track of when the music position hasn't been updated at all (which isn't the same as being at beat 0) --- stepmania/src/GameState.cpp | 4 +++- stepmania/src/GameState.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 749ea7bc98..6946232c1f 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -96,9 +96,11 @@ void GameState::ResetLastRanking() } } +const float GameState::MUSIC_SECONDS_INVALID = -5000.0f; + void GameState::ResetMusicStatistics() { - m_fMusicSeconds = 0; + m_fMusicSeconds = MUSIC_SECONDS_INVALID; m_fSongBeat = 0; m_fCurBPS = 10; m_bFreeze = false; diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 193fa62a36..ec36f84e85 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -94,6 +94,7 @@ public: float m_fCurBPS; bool m_bFreeze; // in the middle of a freeze bool m_bPastHereWeGo; + static const float MUSIC_SECONDS_INVALID; void ResetMusicStatistics(); // Call this when it's time to play a new song. Clears the values above. void UpdateSongPosition(float fPositionSeconds);