From 1f807c8e0f295f56e00c8b0708bac7cffbd0bb11 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 8 May 2004 03:49:32 +0000 Subject: [PATCH] fix long-running cabinet-lights causes gameplay to end very late --- stepmania/src/Song.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 1d62d171b9..0a9bc6c1fb 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -51,7 +51,7 @@ #define CACHE_DIR "Cache/" -const int FILE_CACHE_VERSION = 136; // increment this when Song or Steps changes to invalidate cache +const int FILE_CACHE_VERSION = 137; // increment this when Song or Steps changes to invalidate cache // also increment it on the rare occasion where we split modes const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; @@ -851,6 +851,11 @@ void Song::ReCalculateRadarValuesAndLastBeat() if(tempNoteData.GetLastRow() == 0) continue; + // Don't set first/last beat based on lights. They often start very + // early and end very late. + if( pNotes->m_StepsType == STEPS_TYPE_LIGHTS_CABINET ) + continue; + float fFirstBeat = tempNoteData.GetFirstBeat(); float fLastBeat = tempNoteData.GetLastBeat(); if( m_fFirstBeat == -1 )