make the eval radar sane (but not necessarily correct)

This commit is contained in:
Glenn Maynard
2003-02-18 07:22:09 +00:00
parent 72088e53e3
commit ea1867997d
+16
View File
@@ -280,4 +280,20 @@ void GameState::GetFinalEvalStatsAndSongs( StageStats& statsOut, vector<Song*>&
statsOut += GAMESTATE->m_vPassedStageStats[i];
vSongsOut.push_back( GAMESTATE->m_vPassedStageStats[i].pSong );
}
if(!vSongsOut.size()) return;
/* XXX: I have no idea if this is correct--but it's better than overflowing,
* anyway. -glenn */
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( !IsPlayerEnabled(p) )
continue;
for( int r = 0; r < NUM_RADAR_CATEGORIES; r++)
{
statsOut.fRadarPossible[p][r] /= vSongsOut.size();
statsOut.fRadarActual[p][r] /= vSongsOut.size();
}
}
}