fix assert double-loading the static song background
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user