From 16fd7077bbeacd4e79fd5808c5c14aa5a0e3af69 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 4 May 2005 20:32:31 +0000 Subject: [PATCH] separate song beat for lights, to fix off-sync lights in menus --- stepmania/src/GameState.cpp | 1 + stepmania/src/GameState.h | 1 + 2 files changed, 2 insertions(+) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 9429a86297..fea0cf037a 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -668,6 +668,7 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti ASSERT_M( m_fSongBeat > -2000, ssprintf("%f %f", m_fSongBeat, fPositionSeconds) ); m_fMusicSeconds = fPositionSeconds; + m_fLightSongBeat = timing.GetBeatFromElapsedTime( fPositionSeconds + g_fLightsFalloffSeconds ); Actor::SetBGMTime( fPositionSeconds, m_fSongBeat ); diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 136a404a53..5d53e98ab1 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -152,6 +152,7 @@ public: float m_fMusicSeconds; // time into the current song float m_fSongBeat; float m_fCurBPS; + float m_fLightSongBeat; // g_fLightsFalloffSeconds ahead bool m_bFreeze; // in the middle of a freeze RageTimer m_LastBeatUpdate; // time of last m_fSongBeat, etc. update bool m_bPastHereWeGo;