add "randomcourse" File keyword
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "GameState.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include "SongManager.h"
|
||||
#include "Course.h"
|
||||
|
||||
|
||||
Actor* LoadFromActorFile( CString sIniPath, CString sLayer )
|
||||
@@ -109,6 +110,21 @@ Actor* LoadFromActorFile( CString sIniPath, CString sLayer )
|
||||
pActor = MakeActor( sFile );
|
||||
TEXTUREMAN->EnableOddDimensionWarning();
|
||||
}
|
||||
else if( sFile.CompareNoCase("coursebanner")==0 )
|
||||
{
|
||||
Course *pCourse = GAMESTATE->m_pCurCourse;
|
||||
if( pCourse == NULL )
|
||||
pCourse = SONGMAN->GetRandomCourse();
|
||||
|
||||
if( pCourse && pCourse->HasBanner() )
|
||||
sFile = pCourse->m_sBannerPath;
|
||||
else
|
||||
sFile = THEME->GetPathToG("Common fallback banner");
|
||||
|
||||
TEXTUREMAN->DisableOddDimensionWarning();
|
||||
pActor = MakeActor( sFile );
|
||||
TEXTUREMAN->EnableOddDimensionWarning();
|
||||
}
|
||||
else if( IsAFile(sDir+sFile) || IsADirectory(sDir+sFile) )
|
||||
{
|
||||
// If we know this is an exact match, don't bother with the
|
||||
|
||||
Reference in New Issue
Block a user