fix DIFFICULTY_INVALID used as a valid value

This commit is contained in:
Chris Danford
2006-07-14 20:26:11 +00:00
parent 8b3f014a73
commit 691d852d68
+8 -5
View File
@@ -1349,12 +1349,15 @@ void ScreenSelectMusic::SwitchToPreferredDifficulty()
break;
}
int iDiff = abs(m_vpSteps[i]->GetDifficulty() - GAMESTATE->m_PreferredDifficulty[pn]);
if( iCurDifference == -1 || iDiff < iCurDifference )
if( GAMESTATE->m_PreferredDifficulty[pn] != DIFFICULTY_INVALID )
{
iSelection = i;
iCurDifference = iDiff;
int iDiff = abs(m_vpSteps[i]->GetDifficulty() - GAMESTATE->m_PreferredDifficulty[pn]);
if( iCurDifference == -1 || iDiff < iCurDifference )
{
iSelection = i;
iCurDifference = iDiff;
}
}
}