From aa832e4e4dba7cee8ee2508d5419ec79ee7a6222 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 5 Aug 2005 09:59:44 +0000 Subject: [PATCH] fill new profiles with a random character --- stepmania/src/Profile.cpp | 4 +++- stepmania/src/Profile.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 46c3d55ab0..480198569e 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -1888,10 +1888,12 @@ void Profile::BackupToDir( CString sFromDir, CString sToDir ) FileCopy( sFromDir+DONT_SHARE_SIG, sToDir+DONT_SHARE_SIG ); } -bool Profile::CreateNewProfile( CString sProfileDir, CString sName ) +bool Profile::CreateNewProfile( CString sProfileDir, CString sName, bool bFillWithRandomCharacter ) { Profile pro; pro.m_sDisplayName = sName; + if( bFillWithRandomCharacter ) + pro.m_sCharacter = GAMESTATE->GetRandomCharacter()->m_sName; bool bResult = pro.SaveAllToDir( sProfileDir, PREFSMAN->m_bSignProfileData ); FlushDirCache(); return bResult; diff --git a/stepmania/src/Profile.h b/stepmania/src/Profile.h index c69613ff57..1740f3da0c 100644 --- a/stepmania/src/Profile.h +++ b/stepmania/src/Profile.h @@ -332,7 +332,7 @@ public: void SaveStatsWebPageToDir( CString sDir ) const; void SaveMachinePublicKeyToDir( CString sDir ) const; - static bool CreateNewProfile( CString sProfileDir, CString sName ); + static bool CreateNewProfile( CString sProfileDir, CString sName, bool bFillWithRandomCharacter ); static void BackupToDir( CString sFromDir, CString sToDir ); // Lua