fix saving of machine scores for machine edits

This commit is contained in:
Chris Danford
2005-06-15 09:25:33 +00:00
parent cfa50fd225
commit 39b631da51
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ void PaneDisplay::SetContent( PaneContents c )
const Course *pCourse = GAMESTATE->m_pCurCourse;
const Trail *pTrail = GAMESTATE->m_pCurTrail[m_PlayerNumber];
const Profile *pProfile = PROFILEMAN->IsPersistentProfile(m_PlayerNumber) ? PROFILEMAN->GetProfile(m_PlayerNumber) : NULL;
bool bIsPlayerEdit = pSteps && pSteps->IsAnEdit() && pSteps->GetLoadedFromProfileSlot() != PROFILE_SLOT_MACHINE;
bool bIsPlayerEdit = pSteps && pSteps->IsAPlayerEdit();
if( (g_Contents[c].req&NEED_NOTES) && !pSteps )
goto done;
+2 -2
View File
@@ -500,8 +500,8 @@ void ProfileManager::AddStepsScore( const Song* pSong, const Steps* pSteps, Play
if( PROFILEMAN->IsPersistentProfile(pn) )
PROFILEMAN->GetProfile(pn)->AddStepsHighScore( pSong, pSteps, hs, iPersonalIndexOut );
// don't leave machine high scores for edits
if( pSteps->GetDifficulty() != DIFFICULTY_EDIT )
// don't leave machine high scores for edits loaded from the player's card
if( !pSteps->IsAPlayerEdit() )
PROFILEMAN->GetMachineProfile()->AddStepsHighScore( pSong, pSteps, hs, iMachineIndexOut );
}
+1
View File
@@ -31,6 +31,7 @@ public:
// Use a special value of difficulty
bool IsAnEdit() const { return m_Difficulty == DIFFICULTY_EDIT; }
bool IsAPlayerEdit() const { return m_Difficulty == DIFFICULTY_EDIT && GetLoadedFromProfileSlot() < PROFILE_SLOT_MACHINE; }
bool WasLoadedFromProfile() const { return m_LoadedFromProfile != PROFILE_SLOT_INVALID; }
ProfileSlot GetLoadedFromProfileSlot() const { return m_LoadedFromProfile; }
unsigned GetHash() const { return Real()->m_uHash; }