This commit is contained in:
Glenn Maynard
2003-09-06 02:05:39 +00:00
parent fbe8045e3a
commit 112cb0b384
2 changed files with 6 additions and 8 deletions
-6
View File
@@ -462,13 +462,7 @@ void GameState::GetFinalEvalStatsAndSongs( StageStats& statsOut, vector<Song*>&
--PassedRegularSongsLeft;
}
// weight long and marathon songs
int iLengthMultiplier = SongManager::GetNumStagesForSong( s.pSong );
statsOut.AddStats( s );
for( int p=0; p<NUM_PLAYERS; p++ )
if( IsPlayerEnabled(p) )
statsOut.iMeter[p] += s.iMeter[p] * (iLengthMultiplier-1);
vSongsOut.insert( vSongsOut.begin(), s.pSong );
}
+6 -2
View File
@@ -14,7 +14,7 @@
#include "StageStats.h"
#include "GameState.h"
#include "RageLog.h"
#include "SongManager.h"
StageStats::StageStats()
{
@@ -27,9 +27,13 @@ void StageStats::AddStats( const StageStats& other )
StageType = STAGE_INVALID; // meaningless
memset( fAliveSeconds, 0, sizeof(fAliveSeconds) );
// weight long and marathon songs
ASSERT( other.pSong );
const int iLengthMultiplier = SongManager::GetNumStagesForSong( other.pSong );
for( int p=0; p<NUM_PLAYERS; p++ )
{
iMeter[p] += other.iMeter[p];
iMeter[p] += other.iMeter[p] * iLengthMultiplier;
fAliveSeconds[p] += other.fAliveSeconds[p];
bFailed[p] |= other.bFailed[p];
iPossibleDancePoints[p] += other.iPossibleDancePoints[p];