Add: More stuff to detur crashes.
This commit is contained in:
@@ -64,6 +64,9 @@ void ScreenNetEvaluation::RedoUserTexts()
|
||||
|
||||
m_iCurrentPlayer = 0;
|
||||
|
||||
for( int i=0; i<m_iActivePlayers; ++i )
|
||||
this->RemoveChild( &m_textUsers[i] );
|
||||
|
||||
m_textUsers.resize(m_iActivePlayers);
|
||||
|
||||
for( int i=0; i<m_iActivePlayers; ++i )
|
||||
@@ -127,6 +130,22 @@ void ScreenNetEvaluation::HandleScreenMessage( const ScreenMessage SM )
|
||||
LOG->Trace("SMNETCheckpoint");
|
||||
for( int i=0; i<m_iActivePlayers; ++i )
|
||||
{
|
||||
//Strange occourances because of timing
|
||||
//cause these things not to work right
|
||||
//and will sometimes cause a crash.
|
||||
//We should make SURE we won't crash!
|
||||
if ( i >= NSMAN->m_EvalPlayerData.size() )
|
||||
break;
|
||||
|
||||
if ( NSMAN->m_EvalPlayerData[i].name >= NSMAN->m_PlayerNames.size() )
|
||||
break;
|
||||
|
||||
if ( NSMAN->m_EvalPlayerData[i].name < 0 )
|
||||
break;
|
||||
|
||||
if ( i >= m_textUsers.size() )
|
||||
break;
|
||||
|
||||
m_textUsers[i].SetText( NSMAN->m_PlayerNames[NSMAN->m_EvalPlayerData[i].name] );
|
||||
if ( NSMAN->m_EvalPlayerData[i].grade < GRADE_TIER_3 ) //Yes, hardcoded (I'd like to leave it that way)
|
||||
m_textUsers[i].TurnRainbowOn();
|
||||
|
||||
@@ -88,12 +88,16 @@ ScreenNetSelectMusic::ScreenNetSelectMusic( const CString& sName ) : ScreenNetSe
|
||||
NSMAN->ReportPlayerOptions();
|
||||
|
||||
m_bInitialSelect = false;
|
||||
m_bAllowInput = false;
|
||||
}
|
||||
|
||||
void ScreenNetSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type,
|
||||
const GameInput& GameI, const MenuInput& MenuI,
|
||||
const StyleInput& StyleI )
|
||||
{
|
||||
if( !m_bAllowInput )
|
||||
return;
|
||||
|
||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||
return;
|
||||
|
||||
@@ -232,6 +236,7 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
||||
m_MusicWheel.Move(-1);
|
||||
m_MusicWheel.Move(1);
|
||||
m_MusicWheel.Select();
|
||||
m_bAllowInput = true;
|
||||
break;
|
||||
case SM_BackFromOpts:
|
||||
//XXX: HACK: This will causes ScreenSelectOptions to go back here.
|
||||
|
||||
@@ -86,6 +86,7 @@ private:
|
||||
Song * m_cSong;
|
||||
|
||||
bool m_bInitialSelect;
|
||||
bool m_bAllowInput;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user