Oops... Fixed 100% all the time crash I made.

This commit is contained in:
Charles Lohr
2004-08-13 08:40:53 +00:00
parent fef23248ea
commit 95f896e68e
2 changed files with 14 additions and 8 deletions
+5 -1
View File
@@ -430,7 +430,7 @@ void ScreenGameplay::Init()
FOREACH_PlayerNumber(p) FOREACH_PlayerNumber(p)
if (!GAMESTATE->IsPlayerEnabled(p)) if (!GAMESTATE->IsPlayerEnabled(p))
i=p; i=p;
m_ShowScoreboard=false;
if (i!=-1) if (i!=-1)
{ {
FOREACH_NSScoreBoardColumn (i2) FOREACH_NSScoreBoardColumn (i2)
@@ -442,6 +442,7 @@ void ScreenGameplay::Init()
this->AddChild( &m_Scoreboard[i2] ); this->AddChild( &m_Scoreboard[i2] );
m_Scoreboard[i2].SetText(NSMAN->m_Scoreboard[i2]); m_Scoreboard[i2].SetText(NSMAN->m_Scoreboard[i2]);
m_Scoreboard[i2].SetVertAlign(align_top); m_Scoreboard[i2].SetVertAlign(align_top);
m_ShowScoreboard=true;
} }
} }
} }
@@ -1577,6 +1578,7 @@ void ScreenGameplay::Update( float fDeltaTime )
if( m_pLifeMeter[pn2] ) if( m_pLifeMeter[pn2] )
NSMAN->m_playerLife[pn2] = int(m_pLifeMeter[pn2]->GetLife()*10000); NSMAN->m_playerLife[pn2] = int(m_pLifeMeter[pn2]->GetLife()*10000);
} }
if (m_ShowScoreboard)
FOREACH_NSScoreBoardColumn (cn) FOREACH_NSScoreBoardColumn (cn)
if (NSMAN->ChangedScoreboard(cn)) if (NSMAN->ChangedScoreboard(cn))
m_Scoreboard[cn].SetText(NSMAN->m_Scoreboard[cn]); m_Scoreboard[cn].SetText(NSMAN->m_Scoreboard[cn]);
@@ -2364,6 +2366,7 @@ void ScreenGameplay::TweenOnScreen()
ON_COMMAND( m_DifficultyMeter[p] ); ON_COMMAND( m_DifficultyMeter[p] );
} }
if (m_ShowScoreboard)
FOREACH_NSScoreBoardColumn( sc ) FOREACH_NSScoreBoardColumn( sc )
ON_COMMAND( m_Scoreboard[sc] ); ON_COMMAND( m_Scoreboard[sc] );
@@ -2406,6 +2409,7 @@ void ScreenGameplay::TweenOffScreen()
} }
m_Overlay.PlayCommand("Off"); m_Overlay.PlayCommand("Off");
if (m_ShowScoreboard)
FOREACH_NSScoreBoardColumn( sc ) FOREACH_NSScoreBoardColumn( sc )
OFF_COMMAND( m_Scoreboard[sc] ); OFF_COMMAND( m_Scoreboard[sc] );
+2
View File
@@ -127,6 +127,8 @@ protected:
ActiveAttackList m_ActiveAttackList[NUM_PLAYERS]; ActiveAttackList m_ActiveAttackList[NUM_PLAYERS];
BitmapText m_Scoreboard[NUM_NSSB_CATEGORIES]; // for NSMAN, so we can have a scoreboard BitmapText m_Scoreboard[NUM_NSSB_CATEGORIES]; // for NSMAN, so we can have a scoreboard
bool m_ShowScoreboard;
BitmapText m_textDebug; BitmapText m_textDebug;
RageTimer m_GiveUpTimer; RageTimer m_GiveUpTimer;