fix ending never fades out if no memory cards removed

This commit is contained in:
Chris Danford
2004-01-11 09:26:01 +00:00
parent 02d371c494
commit cf06498ff3
+6 -5
View File
@@ -133,7 +133,10 @@ void ScreenEnding::Update( float fDeltaTime )
{
ScreenAttract::Update( fDeltaTime );
bool bRemovedOneOrMore = false;
m_fTimeUntilBeginFadingOut = max( 0, m_fTimeUntilBeginFadingOut-fDeltaTime );
if( !m_In.IsTransitioning() && !m_Out.IsTransitioning() )
{
bool bAllRemoved = true;
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -148,16 +151,14 @@ void ScreenEnding::Update( float fDeltaTime )
else
{
m_sprRemoveMemoryCard[p].SetHidden( true );
bRemovedOneOrMore = true;
}
}
}
m_fTimeUntilBeginFadingOut = max( 0, m_fTimeUntilBeginFadingOut-fDeltaTime );
if( bRemovedOneOrMore && bAllRemoved )
if( bAllRemoved )
this->PostScreenMessage( SM_BeginFadingOut, m_fTimeUntilBeginFadingOut );
}
}
void ScreenEnding::HandleScreenMessage( const ScreenMessage SM )
{