This commit is contained in:
Glenn Maynard
2004-06-04 22:49:46 +00:00
parent 1bebbc1b4f
commit 693eee576a
+6 -12
View File
@@ -196,14 +196,13 @@ void ScreenSelectStyle::MenuStart( PlayerNumber pn )
// //
// TweenOffScreen // TweenOffScreen
// //
unsigned i;
/* Stop all tweens where they are, since we might have selected before /* Stop all tweens where they are, since we might have selected before
* we finished tweening in. */ * we finished tweening in. */
for( i=0; i<m_SubActors.size(); i++ ) for( unsigned i=0; i<m_SubActors.size(); i++ )
m_SubActors[i]->StopTweening(); m_SubActors[i]->StopTweening();
for( i=0; i<m_aModeChoices.size(); i++ ) for( unsigned i=0; i<m_aModeChoices.size(); i++ )
{ {
OFF_COMMAND( m_sprIcon[i] ); OFF_COMMAND( m_sprIcon[i] );
OFF_COMMAND( m_textIcon[i] ); OFF_COMMAND( m_textIcon[i] );
@@ -222,13 +221,7 @@ int ScreenSelectStyle::GetSelectionIndex( PlayerNumber pn )
void ScreenSelectStyle::UpdateSelectableChoices() void ScreenSelectStyle::UpdateSelectableChoices()
{ {
unsigned i; for( unsigned i=0; i<m_aModeChoices.size(); i++ )
/* If a player joins during the tween-in, this diffuse change
* will be undone by the tween. Hmm.
*
* This is fixed now, since SetDiffuse() will affect the latest
* tween, if we're currently tweening. */
for( i=0; i<m_aModeChoices.size(); i++ )
{ {
/* If the icon is text, use a dimmer diffuse, or we won't be /* If the icon is text, use a dimmer diffuse, or we won't be
* able to see the glow. */ * able to see the glow. */
@@ -244,11 +237,11 @@ void ScreenSelectStyle::UpdateSelectableChoices()
} }
} }
// Select first enabled choie // Select the first enabled choice.
BeforeChange(); BeforeChange();
int iSwitchToStyleIndex = -1; // -1 means none found int iSwitchToStyleIndex = -1; // -1 means none found
for( i=0; i<m_aModeChoices.size(); i++ ) for( unsigned i=0; i<m_aModeChoices.size(); i++ )
{ {
const ModeChoice& mc = m_aModeChoices[i]; const ModeChoice& mc = m_aModeChoices[i];
if( mc.IsPlayable() ) if( mc.IsPlayable() )
@@ -257,6 +250,7 @@ void ScreenSelectStyle::UpdateSelectableChoices()
break; break;
} }
} }
if( iSwitchToStyleIndex == -1 )// no styles are enabled. We're stuck! if( iSwitchToStyleIndex == -1 )// no styles are enabled. We're stuck!
{ {
DEBUG_ASSERT(0); DEBUG_ASSERT(0);