fix Profiles loaded for players that aren't joined

This commit is contained in:
Chris Danford
2004-04-23 02:01:44 +00:00
parent 9fe68e1702
commit 7a47504507
2 changed files with 16 additions and 14 deletions
+15
View File
@@ -523,3 +523,18 @@ void ProfileManager::IncrementCategoryPlayCount( StepsType st, RankingCategory r
PROFILEMAN->GetMachineProfile()->IncrementCategoryPlayCount( st, rc );
}
bool ProfileManager::IsUsingProfile( ProfileSlot slot ) const
{
switch( slot )
{
case PROFILE_SLOT_PLAYER_1:
case PROFILE_SLOT_PLAYER_2:
return GAMESTATE->IsHumanPlayer((PlayerNumber)slot) && !m_sProfileDir[slot].empty();
case PROFILE_SLOT_MACHINE:
return true;
default:
ASSERT(0);
return false;
}
}
+1 -14
View File
@@ -52,20 +52,7 @@ public:
void SaveMachineProfile();
bool IsUsingProfile( PlayerNumber pn ) const { return !m_sProfileDir[pn].empty(); }
bool IsUsingProfile( ProfileSlot slot ) const
{
switch( slot )
{
case PROFILE_SLOT_PLAYER_1:
case PROFILE_SLOT_PLAYER_2:
return !m_sProfileDir[slot].empty();
case PROFILE_SLOT_MACHINE:
return true;
default:
ASSERT(0);
return false;
}
}
bool IsUsingProfile( ProfileSlot slot ) const;
const Profile* GetProfile( PlayerNumber pn ) const;
Profile* GetProfile( PlayerNumber pn ) { return (Profile*) ((const ProfileManager *) this)->GetProfile(pn); }
const Profile* GetProfile( ProfileSlot slot ) const;