From 05de095e0e2fcb36056e34ce3187ecbe5b0bc1d8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 31 Jul 2003 23:01:02 +0000 Subject: [PATCH] Keep track of total error, in ms. --- stepmania/src/Player.cpp | 2 ++ stepmania/src/StageStats.cpp | 3 ++- stepmania/src/StageStats.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 2526f32fde..dfd0d440b5 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -429,6 +429,8 @@ void Player::Step( int col, RageTimer tm ) const float fSecondsFromPerfect = fabsf( fNoteOffset ); + GAMESTATE->m_CurStageStats.iTotalError[m_PlayerNumber] += (int) roundf( fSecondsFromPerfect * 1000 ); + // calculate TapNoteScore TapNoteScore score; diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index b16e543a68..31e19f0104 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -47,8 +47,9 @@ void StageStats::operator+=( const StageStats& other ) fRadarActual[p][r] += other.fRadarActual[p][r]; } fSecondsBeforeFail[p] += other.fSecondsBeforeFail[p]; - iSongsPlayed[p] += other.iSongsPlayed[p]; iSongsPassed[p] += other.iSongsPassed[p]; + iSongsPlayed[p] += other.iSongsPlayed[p]; + iTotalError[p] += other.iTotalError[p]; } } diff --git a/stepmania/src/StageStats.h b/stepmania/src/StageStats.h index 4e02a87981..864d25d04f 100644 --- a/stepmania/src/StageStats.h +++ b/stepmania/src/StageStats.h @@ -41,6 +41,7 @@ struct StageStats /* The number of songs played and passed, respectively. */ int iSongsPassed[NUM_PLAYERS]; int iSongsPlayed[NUM_PLAYERS]; + int iTotalError[NUM_PLAYERS]; };