fix selecting an edit and moving to chance results in weird difficulty

selection behavior
This commit is contained in:
Glenn Maynard
2006-03-29 02:54:11 +00:00
parent 9c4dc961dd
commit 6faf9b9b69
3 changed files with 30 additions and 2 deletions
+3 -1
View File
@@ -70,13 +70,15 @@ void DifficultyList::Load()
int DifficultyList::GetCurrentRowIndex( PlayerNumber pn ) const
{
Difficulty ClosestDifficulty = GAMESTATE->GetClosestShownDifficulty(pn);
for( unsigned i=0; i<m_Rows.size(); i++ )
{
const Row &row = m_Rows[i];
if( GAMESTATE->m_pCurSteps[pn] == NULL )
{
if( row.m_dc == GAMESTATE->m_PreferredDifficulty[pn] )
if( row.m_dc == ClosestDifficulty )
return i;
}
else