fix assert double-loading the static song background

This commit is contained in:
Chris Danford
2005-07-18 17:34:00 +00:00
parent c76799ffa0
commit c3fd71dd76
+4
View File
@@ -642,10 +642,14 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
} }
if( bStaticBackgroundUsed ) if( bStaticBackgroundUsed )
{
bool bIsAlreadyLoaded = mainlayer.m_BGAnimations.find(STATIC_BACKGROUND_DEF) != mainlayer.m_BGAnimations.end();
if( !bIsAlreadyLoaded )
{ {
bool bSuccess = mainlayer.CreateBackground( m_pSong, STATIC_BACKGROUND_DEF ); bool bSuccess = mainlayer.CreateBackground( m_pSong, STATIC_BACKGROUND_DEF );
ASSERT( bSuccess ); ASSERT( bSuccess );
} }
}
// Look for the random file marker, and replace the segment with LoadFromRandom. // Look for the random file marker, and replace the segment with LoadFromRandom.