From cb2abf07c4f6782f940e325a7899699e9bb15db5 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 23 Mar 2005 19:49:24 +0000 Subject: [PATCH] fix bogus score values fix play count not incremented, so scores don't save --- stepmania/src/GameCommand.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 3007d3b4ef..4bfe76d918 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -573,10 +573,10 @@ void GameCommand::Apply( PlayerNumber pn ) const static HighScore MakeRandomHighScore() { HighScore hs; - hs.sName = (char)('A'+rand()%26); + hs.sName = "FAKE"; hs.grade = (Grade)SCALE( rand()%5, 0, 4, GRADE_TIER_1, GRADE_TIER_5 ); hs.iScore = rand()%100*1000; - hs.fPercentDP = randomf( 50.0f, 100.0f ); + hs.fPercentDP = randomf( 0.5f, 1.0f ); hs.fSurviveSeconds = randomf( 30.0f, 100.0f ); PlayerOptions po; po.ChooseRandomMofifiers(); @@ -742,6 +742,7 @@ void GameCommand::Apply( const vector &vpns ) const vector vpAllSteps = (*pSong)->GetAllSteps(); FOREACH( Steps*, vpAllSteps, pSteps ) { + pProfile->IncrementStepsPlayCount( *pSong, *pSteps ); for( int i=0; im_iMaxHighScoresPerListForMachine; i++ ) { int iIndex = 0; @@ -758,6 +759,7 @@ void GameCommand::Apply( const vector &vpns ) const (*pCourse)->GetAllTrails( vpAllTrails ); FOREACH( Trail*, vpAllTrails, pTrail ) { + pProfile->IncrementCoursePlayCount( *pCourse, *pTrail ); for( int i=0; im_iMaxHighScoresPerListForMachine; i++ ) { int iIndex = 0;