Store the selected name to the profile before trimming spaces, so that the name

appears properly next time the player enters their name.
This commit is contained in:
Thad Ward
2004-05-24 09:26:44 +00:00
parent cfc3e3f3b1
commit 438347135d
+5 -5
View File
@@ -416,16 +416,16 @@ void ScreenNameEntry::MenuStart( PlayerNumber pn )
m_soundStep.Play();
TrimRight( m_sSelectedName[pn], " " );
TrimLeft( m_sSelectedName[pn], " " );
GAMESTATE->StoreRankingName( pn, m_sSelectedName[pn] );
// save last used ranking name
Profile* pProfile = PROFILEMAN->GetProfile(pn);
if( pProfile )
pProfile->m_sLastUsedHighScoreName = m_sSelectedName[pn];
TrimRight( m_sSelectedName[pn], " " );
TrimLeft( m_sSelectedName[pn], " " );
GAMESTATE->StoreRankingName( pn, m_sSelectedName[pn] );
if( !AnyStillEntering() && !m_Out.IsTransitioning() )
m_Out.StartTransitioning( SM_GoToNextScreen );
}