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_pPlayerState[p]->m_PlayerOptions.Assign( ModsLevel_Stage, m_pPlayerState[p]->m_PlayerOptions.GetPreferred() );
|
||||||
m_SongOptions.Assign( ModsLevel_Stage, m_SongOptions.GetPreferred() );
|
m_SongOptions.Assign( ModsLevel_Stage, m_SongOptions.GetPreferred() );
|
||||||
}
|
}
|
||||||
|
STATSMAN->m_CurStageStats.fMusicRate = m_SongOptions.GetSong().m_fMusicRate;
|
||||||
m_iNumStagesOfThisSong = GetNumStagesForCurrentSong();
|
m_iNumStagesOfThisSong = GetNumStagesForCurrentSong();
|
||||||
ASSERT( m_iNumStagesOfThisSong != -1 );
|
ASSERT( m_iNumStagesOfThisSong != -1 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ StageStats::StageStats()
|
|||||||
bUsedAutoplay = false;
|
bUsedAutoplay = false;
|
||||||
fGameplaySeconds = 0;
|
fGameplaySeconds = 0;
|
||||||
fStepsSeconds = 0;
|
fStepsSeconds = 0;
|
||||||
|
fMusicRate = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StageStats::Init()
|
void StageStats::Init()
|
||||||
@@ -129,7 +130,7 @@ float StageStats::GetTotalPossibleStepsSeconds() const
|
|||||||
float fSecs = 0;
|
float fSecs = 0;
|
||||||
FOREACH_CONST( Song*, vpPossibleSongs, s )
|
FOREACH_CONST( Song*, vpPossibleSongs, s )
|
||||||
fSecs += (*s)->GetStepsSeconds();
|
fSecs += (*s)->GetStepsSeconds();
|
||||||
return fSecs;
|
return fSecs / fMusicRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StageStats::CommitScores( bool bSummary )
|
void StageStats::CommitScores( bool bSummary )
|
||||||
|
|||||||
@@ -40,9 +40,10 @@ public:
|
|||||||
// They should be made more accurate.
|
// They should be made more accurate.
|
||||||
float fGameplaySeconds; // how many seconds before gameplay ended. Updated by Gameplay, not scaled by music rate.
|
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 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.
|
// 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_player[NUM_PLAYERS];
|
||||||
PlayerStageStats m_multiPlayer[NUM_MultiPlayer];
|
PlayerStageStats m_multiPlayer[NUM_MultiPlayer];
|
||||||
|
|||||||
Reference in New Issue
Block a user