simplify iSaveProfileEvery stuff and make it closer to correct
This commit is contained in:
@@ -690,7 +690,8 @@ void GameState::FinishStage()
|
||||
if( iOldStageIndex/iSaveProfileEvery < m_iCurrentStageIndex/iSaveProfileEvery )
|
||||
{
|
||||
LOG->Trace( "Played %i stages; saving profiles ...", iSaveProfileEvery );
|
||||
PROFILEMAN->SaveAllProfiles();
|
||||
PROFILEMAN->SaveMachineProfile();
|
||||
this->SaveProfiles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,19 +303,6 @@ bool ProfileManager::FastLoadProfileNameFromMemoryCard( RString sRootDir, RStrin
|
||||
return false;
|
||||
}
|
||||
|
||||
void ProfileManager::SaveAllProfiles() const
|
||||
{
|
||||
this->SaveMachineProfile();
|
||||
|
||||
FOREACH_HumanPlayer( pn )
|
||||
{
|
||||
if( !IsPersistentProfile(pn) )
|
||||
continue;
|
||||
|
||||
this->SaveProfile( pn );
|
||||
}
|
||||
}
|
||||
|
||||
bool ProfileManager::SaveProfile( PlayerNumber pn ) const
|
||||
{
|
||||
if( m_sProfileDir[pn].empty() )
|
||||
|
||||
@@ -50,7 +50,6 @@ public:
|
||||
bool LoadLocalProfileFromMachine( PlayerNumber pn );
|
||||
bool LoadProfileFromMemoryCard( PlayerNumber pn, bool bLoadEdits = true );
|
||||
bool FastLoadProfileNameFromMemoryCard( RString sRootDir, RString &sName ) const;
|
||||
void SaveAllProfiles() const;
|
||||
bool SaveProfile( PlayerNumber pn ) const;
|
||||
bool SaveLocalProfile( RString sProfileID );
|
||||
void UnloadProfile( PlayerNumber pn );
|
||||
|
||||
Reference in New Issue
Block a user