fix DIFFICULTY_INVALID used as a valid value
This commit is contained in:
@@ -1349,12 +1349,15 @@ void ScreenSelectMusic::SwitchToPreferredDifficulty()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iDiff = abs(m_vpSteps[i]->GetDifficulty() - GAMESTATE->m_PreferredDifficulty[pn]);
|
if( GAMESTATE->m_PreferredDifficulty[pn] != DIFFICULTY_INVALID )
|
||||||
|
|
||||||
if( iCurDifference == -1 || iDiff < iCurDifference )
|
|
||||||
{
|
{
|
||||||
iSelection = i;
|
int iDiff = abs(m_vpSteps[i]->GetDifficulty() - GAMESTATE->m_PreferredDifficulty[pn]);
|
||||||
iCurDifference = iDiff;
|
|
||||||
|
if( iCurDifference == -1 || iDiff < iCurDifference )
|
||||||
|
{
|
||||||
|
iSelection = i;
|
||||||
|
iCurDifference = iDiff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user