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
+12 -8
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,9 +1578,10 @@ 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);
} }
FOREACH_NSScoreBoardColumn (cn) if (m_ShowScoreboard)
if (NSMAN->ChangedScoreboard(cn)) FOREACH_NSScoreBoardColumn (cn)
m_Scoreboard[cn].SetText(NSMAN->m_Scoreboard[cn]); if (NSMAN->ChangedScoreboard(cn))
m_Scoreboard[cn].SetText(NSMAN->m_Scoreboard[cn]);
} }
} }
@@ -2364,8 +2366,9 @@ void ScreenGameplay::TweenOnScreen()
ON_COMMAND( m_DifficultyMeter[p] ); ON_COMMAND( m_DifficultyMeter[p] );
} }
FOREACH_NSScoreBoardColumn( sc ) if (m_ShowScoreboard)
ON_COMMAND( m_Scoreboard[sc] ); FOREACH_NSScoreBoardColumn( sc )
ON_COMMAND( m_Scoreboard[sc] );
m_Overlay.PlayCommand("On"); m_Overlay.PlayCommand("On");
} }
@@ -2406,8 +2409,9 @@ void ScreenGameplay::TweenOffScreen()
} }
m_Overlay.PlayCommand("Off"); m_Overlay.PlayCommand("Off");
FOREACH_NSScoreBoardColumn( sc ) if (m_ShowScoreboard)
OFF_COMMAND( m_Scoreboard[sc] ); FOREACH_NSScoreBoardColumn( sc )
OFF_COMMAND( m_Scoreboard[sc] );
m_textDebug.StopTweening(); m_textDebug.StopTweening();
m_textDebug.BeginTweening( 1/8.f ); m_textDebug.BeginTweening( 1/8.f );
+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;