fix m_meterSongPosition finishing too soon
This commit is contained in:
@@ -1092,13 +1092,6 @@ void ScreenGameplay::LoadNextSong()
|
||||
* -Chris */
|
||||
m_bZeroDeltaOnNextUpdate = true;
|
||||
|
||||
|
||||
// (Re)Calculate the song position meter
|
||||
m_fSongPosMeterOffset = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat(
|
||||
GAMESTATE->m_pCurSong->m_fFirstBeat );
|
||||
m_fSongPosMeterEnd = ( GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat(
|
||||
GAMESTATE->m_pCurSong->m_fLastBeat ) - m_fSongPosMeterOffset );
|
||||
|
||||
//
|
||||
// Load cabinet lights data
|
||||
//
|
||||
@@ -1537,13 +1530,9 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
//
|
||||
// update song position meter
|
||||
//
|
||||
// IMHHO, The song position bar is best used to represent where in the
|
||||
// step sequence the players are. It looks "better" that way, showing a
|
||||
// song "depleting" as the players wear on. So, it starts "ticking" at
|
||||
// the first arrow and winds down to the very end.
|
||||
float fPercentPositionSong = SCALE( GAMESTATE->m_fMusicSeconds, m_fSongPosMeterOffset,
|
||||
m_fSongPosMeterEnd, 0.0f, 1.0f );
|
||||
|
||||
float fSongStartSeconds = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fFirstBeat );
|
||||
float fSongEndSeconds = GAMESTATE->m_pCurSong->m_Timing.GetElapsedTimeFromBeat( GAMESTATE->m_pCurSong->m_fLastBeat );
|
||||
float fPercentPositionSong = SCALE( GAMESTATE->m_fMusicSeconds, fSongStartSeconds, fSongEndSeconds, 0.0f, 1.0f );
|
||||
CLAMP( fPercentPositionSong, 0, 1 );
|
||||
m_meterSongPosition.SetPercent( fPercentPositionSong );
|
||||
|
||||
|
||||
@@ -162,10 +162,6 @@ protected:
|
||||
BeginnerHelper m_BeginnerHelper;
|
||||
|
||||
NoteData m_CabinetLightsNoteData;
|
||||
|
||||
private:
|
||||
float m_fSongPosMeterEnd;
|
||||
float m_fSongPosMeterOffset;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user