If either player is enabled, you can use GAMESTATE->m_MasterPlayerNumber to get the

first that joined; do this instead of iterating.  Remove redundant check.  Style cleanup.
Charles, please make an effort to conform to the style of the rest of the codebase; you
keep committing stuff in a completely different style and others keep having to clean it up.
This commit is contained in:
Glenn Maynard
2004-08-18 01:23:34 +00:00
parent 0decd5c7eb
commit a7a6fff6cf
+3 -11
View File
@@ -429,18 +429,13 @@ void ScreenGameplay::Init()
//the following is only used in SMLAN/SMOnline
if( NSMAN->useSMserver )
{
int i=-1;
FOREACH_PlayerNumber(p)
if (!GAMESTATE->IsPlayerEnabled(p))
i=p;
m_ShowScoreboard=false;
if (i!=-1)
{
PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber;
FOREACH_NSScoreBoardColumn( i2 )
{
m_Scoreboard[i2].LoadFromFont( THEME->GetPathF(m_sName,"scoreboard") );
m_Scoreboard[i2].SetShadowLength( 0 );
m_Scoreboard[i2].SetName( ssprintf("ScoreboardC%iP%i",i2+1,i+1) );
m_Scoreboard[i2].SetName( ssprintf("ScoreboardC%iP%i",i2+1,pn+1) );
SET_XY( m_Scoreboard[i2] );
this->AddChild( &m_Scoreboard[i2] );
m_Scoreboard[i2].SetText(NSMAN->m_Scoreboard[i2]);
@@ -448,7 +443,6 @@ void ScreenGameplay::Init()
m_ShowScoreboard = true;
}
}
}
m_textSongTitle.LoadFromFont( THEME->GetPathF(m_sName,"song title") );
m_textSongTitle.SetShadowLength( 0 );
@@ -2324,8 +2318,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_soundMusic.Stop();
break;
case SM_NET_UpdateScoreboard:
if (!NSMAN->useSMserver)
break;
if( m_ShowScoreboard )
FOREACH_NSScoreBoardColumn(cn)
if( NSMAN->ChangedScoreboard(cn) )