fix edit high score hash saving

don't save machine high scores for edits
This commit is contained in:
Chris Danford
2004-04-23 02:19:45 +00:00
parent ab1d3bfd0e
commit b28f440883
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -434,13 +434,17 @@ int ProfileManager::GetSongNumTimesPlayed( const Song* pSong, ProfileSlot slot )
void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, PlayerNumber pn, HighScore hs, int &iPersonalIndexOut, int &iMachineIndexOut ) void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, PlayerNumber pn, HighScore hs, int &iPersonalIndexOut, int &iMachineIndexOut )
{ {
hs.sName = RANKING_TO_FILL_IN_MARKER[pn];
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForHighScore ) if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForHighScore )
{ {
hs.sName = RANKING_TO_FILL_IN_MARKER[pn];
if( PROFILEMAN->IsUsingProfile(pn) ) if( PROFILEMAN->IsUsingProfile(pn) )
PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut ); PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut );
else else
iPersonalIndexOut = -1; iPersonalIndexOut = -1;
// don't leave machine high scores for edits
if( pSteps->GetDifficulty() != DIFFICULTY_EDIT )
PROFILEMAN->GetMachineProfile()->AddStepsHighScore( pSong, pSteps, hs, iMachineIndexOut ); PROFILEMAN->GetMachineProfile()->AddStepsHighScore( pSong, pSteps, hs, iMachineIndexOut );
} }
+2
View File
@@ -129,12 +129,14 @@ void StepsID::FromSteps( const Steps *p )
st = STEPS_TYPE_INVALID; st = STEPS_TYPE_INVALID;
dc = DIFFICULTY_INVALID; dc = DIFFICULTY_INVALID;
sDescription = ""; sDescription = "";
uHash = 0;
} }
else else
{ {
st = p->m_StepsType; st = p->m_StepsType;
dc = p->GetDifficulty(); dc = p->GetDifficulty();
sDescription = p->GetDescription(); sDescription = p->GetDescription();
uHash = p->GetHash();
} }
} }