From 0012857bfddf76c989fa091a7932c3df5d157bed Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 21 Sep 2006 01:58:30 +0000 Subject: [PATCH] quick fix to disable affect of tilde in survival --- stepmania/src/ScreenGameplay.cpp | 10 +++++++--- stepmania/src/ScreenGameplay.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 2d046e3bca..91e3ac3898 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1666,14 +1666,18 @@ void ScreenGameplay::Update( float fDeltaTime ) // // Update living players' alive time // + // HACK: Don't scale alive time when ussing tab/tilde. Instead of accumulating time from a timer, + // this time should instead be tied to the music position. + float fUnscaledDeltaTime = m_timerGameplaySeconds.GetDeltaTime(); + FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) if( !pi->GetPlayerStageStats()->bFailed ) - pi->GetPlayerStageStats()->fAliveSeconds += fDeltaTime * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate; + pi->GetPlayerStageStats()->fAliveSeconds += fUnscaledDeltaTime * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate; // update fGameplaySeconds - STATSMAN->m_CurStageStats.fGameplaySeconds += fDeltaTime; + STATSMAN->m_CurStageStats.fGameplaySeconds += fUnscaledDeltaTime; if( GAMESTATE->m_fSongBeat >= GAMESTATE->m_pCurSong->m_fFirstBeat && GAMESTATE->m_fSongBeat < GAMESTATE->m_pCurSong->m_fLastBeat ) - STATSMAN->m_CurStageStats.fStepsSeconds += fDeltaTime; + STATSMAN->m_CurStageStats.fStepsSeconds += fUnscaledDeltaTime; // // Check for end of song diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index 80b4d0f32b..00c2eb857a 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -224,6 +224,8 @@ protected: vector m_vPlayerInfo; // filled by SGameplay derivatives in Init virtual void FillPlayerInfo( vector &vPlayerInfoOut ) = 0; virtual PlayerInfo &GetPlayerInfoForInput( const InputEventPlus& iep ) { return m_vPlayerInfo[iep.pn]; } + + RageTimer m_timerGameplaySeconds; }; vector::iterator GetNextEnabledPlayerInfo ( vector::iterator iter, vector &v );