fix SUnlockBrowse unlocking entry 1 when all entries are disabled

This commit is contained in:
Chris Danford
2006-06-05 07:36:23 +00:00
parent 22de414288
commit 1aa0b38c9f
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -202,7 +202,8 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM )
{
const GameCommand &gc = m_aGameCommands[iMastersIndex];
m_sNextScreen = gc.m_sScreen;
gc.ApplyToAllPlayers();
if( !gc.m_bInvalid )
gc.ApplyToAllPlayers();
}
else
{
@@ -211,7 +212,8 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM )
int iIndex = this->GetSelectionIndex(p);
const GameCommand &gc = m_aGameCommands[iIndex];
m_sNextScreen = gc.m_sScreen;
gc.Apply( p );
if( !gc.m_bInvalid )
gc.Apply( p );
}
}
+1
View File
@@ -528,6 +528,7 @@ void UnlockManager::Reload()
float UnlockManager::PointsUntilNextUnlock( UnlockRequirement t ) const
{
float fScores[NUM_UnlockRequirement];
ZERO( fScores );
UNLOCKMAN->GetPoints( PROFILEMAN->GetMachineProfile(), fScores );
float fSmallestPoints = FLT_MAX; // or an arbitrarily large value