fix saving of machine scores for machine edits
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user