better FillProfileStats

This commit is contained in:
Glenn Maynard
2007-06-15 15:00:14 +00:00
parent 763de1e6ac
commit 39f75e24c9
+8 -3
View File
@@ -781,7 +781,10 @@ static HighScore MakeRandomHighScore( float fPercentDP )
{ {
HighScore hs; HighScore hs;
hs.SetName( "FAKE" ); hs.SetName( "FAKE" );
hs.SetGrade( (Grade)SCALE( RandomInt(5), 0, 4, Grade_Tier01, Grade_Tier05 ) ); Grade g = (Grade)SCALE( RandomInt(6), 0, 4, Grade_Tier01, Grade_Tier06 );
if( g == Grade_Tier06 )
g = Grade_Failed;
hs.SetGrade( g );
hs.SetScore( RandomInt(100*1000) ); hs.SetScore( RandomInt(100*1000) );
hs.SetPercentDP( fPercentDP ); hs.SetPercentDP( fPercentDP );
hs.SetSurviveSeconds( randomf(30.0f, 100.0f) ); hs.SetSurviveSeconds( randomf(30.0f, 100.0f) );
@@ -826,7 +829,8 @@ static void FillProfileStats( Profile *pProfile )
vector<Steps*> vpAllSteps = (*pSong)->GetAllSteps(); vector<Steps*> vpAllSteps = (*pSong)->GetAllSteps();
FOREACH( Steps*, vpAllSteps, pSteps ) FOREACH( Steps*, vpAllSteps, pSteps )
{ {
pProfile->IncrementStepsPlayCount( *pSong, *pSteps ); if( rand() % 5 )
pProfile->IncrementStepsPlayCount( *pSong, *pSteps );
for( int i=0; i<iCount; i++ ) for( int i=0; i<iCount; i++ )
{ {
int iIndex = 0; int iIndex = 0;
@@ -843,7 +847,8 @@ static void FillProfileStats( Profile *pProfile )
(*pCourse)->GetAllTrails( vpAllTrails ); (*pCourse)->GetAllTrails( vpAllTrails );
FOREACH( Trail*, vpAllTrails, pTrail ) FOREACH( Trail*, vpAllTrails, pTrail )
{ {
pProfile->IncrementCoursePlayCount( *pCourse, *pTrail ); if( rand() % 5 )
pProfile->IncrementCoursePlayCount( *pCourse, *pTrail );
for( int i=0; i<iCount; i++ ) for( int i=0; i<iCount; i++ )
{ {
int iIndex = 0; int iIndex = 0;