Scale GetTotalPossibleStepsSeconds() by fMusicRate. Fixes ComboGraph and GraphDisplay when using a different music rate.
This commit is contained in:
@@ -506,7 +506,7 @@ void GameState::BeginStage()
|
||||
m_pPlayerState[p]->m_PlayerOptions.Assign( ModsLevel_Stage, m_pPlayerState[p]->m_PlayerOptions.GetPreferred() );
|
||||
m_SongOptions.Assign( ModsLevel_Stage, m_SongOptions.GetPreferred() );
|
||||
}
|
||||
|
||||
STATSMAN->m_CurStageStats.fMusicRate = m_SongOptions.GetSong().m_fMusicRate;
|
||||
m_iNumStagesOfThisSong = GetNumStagesForCurrentSong();
|
||||
ASSERT( m_iNumStagesOfThisSong != -1 );
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ StageStats::StageStats()
|
||||
bUsedAutoplay = false;
|
||||
fGameplaySeconds = 0;
|
||||
fStepsSeconds = 0;
|
||||
fMusicRate = 1;
|
||||
}
|
||||
|
||||
void StageStats::Init()
|
||||
@@ -129,7 +130,7 @@ float StageStats::GetTotalPossibleStepsSeconds() const
|
||||
float fSecs = 0;
|
||||
FOREACH_CONST( Song*, vpPossibleSongs, s )
|
||||
fSecs += (*s)->GetStepsSeconds();
|
||||
return fSecs;
|
||||
return fSecs / fMusicRate;
|
||||
}
|
||||
|
||||
void StageStats::CommitScores( bool bSummary )
|
||||
|
||||
@@ -40,9 +40,10 @@ public:
|
||||
// They should be made more accurate.
|
||||
float fGameplaySeconds; // how many seconds before gameplay ended. Updated by Gameplay, not scaled by music rate.
|
||||
float fStepsSeconds; // this is <= fGameplaySeconds unless the song has steps past the end
|
||||
float fMusicRate;
|
||||
|
||||
// Total number of seconds between first beat and last beat for every song.
|
||||
float GetTotalPossibleStepsSeconds() const; // TODO: Scale this by the music rate
|
||||
float GetTotalPossibleStepsSeconds() const;
|
||||
|
||||
PlayerStageStats m_player[NUM_PLAYERS];
|
||||
PlayerStageStats m_multiPlayer[NUM_MultiPlayer];
|
||||
|
||||
Reference in New Issue
Block a user