23e241a: if a BGCHANGE file can't be resolved, don't use the specified effect because it may require 2 files and all random BGs specify only 1 file [Chris Danford]

This commit is contained in:
AJ Kelly
2010-03-12 14:09:35 -06:00
parent 0c96a43e98
commit b5b761234e
+4 -2
View File
@@ -562,8 +562,10 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
{
if( i == BACKGROUND_LAYER_1 )
{
// The background was not found. Try to use a random one instead.
bd = layer.CreateRandomBGA( pSong, bd.m_sEffect, m_RandomBGAnimations, this );
// The background was not found. Try to use a random one instead.
// Don't use the BackgroundDef's effect, because it may be an
// effect that requires 2 files, and random BGA will only supply one file
bd = layer.CreateRandomBGA( pSong, "", m_RandomBGAnimations, this );
if( bd.IsEmpty() )
bd = m_StaticBackgroundDef;
}