From 39f75e24c9e91708556a18ebb43c245b419c3fb0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 15 Jun 2007 15:00:14 +0000 Subject: [PATCH] better FillProfileStats --- stepmania/src/ScreenDebugOverlay.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenDebugOverlay.cpp b/stepmania/src/ScreenDebugOverlay.cpp index b3192f3add..f6d24fe54d 100644 --- a/stepmania/src/ScreenDebugOverlay.cpp +++ b/stepmania/src/ScreenDebugOverlay.cpp @@ -781,7 +781,10 @@ static HighScore MakeRandomHighScore( float fPercentDP ) { HighScore hs; 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.SetPercentDP( fPercentDP ); hs.SetSurviveSeconds( randomf(30.0f, 100.0f) ); @@ -826,7 +829,8 @@ static void FillProfileStats( Profile *pProfile ) vector vpAllSteps = (*pSong)->GetAllSteps(); FOREACH( Steps*, vpAllSteps, pSteps ) { - pProfile->IncrementStepsPlayCount( *pSong, *pSteps ); + if( rand() % 5 ) + pProfile->IncrementStepsPlayCount( *pSong, *pSteps ); for( int i=0; iGetAllTrails( vpAllTrails ); FOREACH( Trail*, vpAllTrails, pTrail ) { - pProfile->IncrementCoursePlayCount( *pCourse, *pTrail ); + if( rand() % 5 ) + pProfile->IncrementCoursePlayCount( *pCourse, *pTrail ); for( int i=0; i