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