Scale GetTotalPossibleStepsSeconds() by fMusicRate. Fixes ComboGraph and GraphDisplay when using a different music rate.

This commit is contained in:
Steve Checkoway
2006-10-30 10:00:43 +00:00
parent 796aa48ba2
commit 9ef4cf40e0
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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 );
}
+2 -1
View File
@@ -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 )
+2 -1
View File
@@ -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];