Implement preview music properly as a new optional tag in the ssc file. Changed ScreenManager to emit an error instead of asserting if a screen attempts to use SetNewScreen inside an InitCommand. Changed decorations layer to be a proper child instead of stripping away the ActorFrame.
This commit is contained in:
@@ -742,7 +742,12 @@ void ScreenManager::LoadDelayedScreen()
|
||||
// Screens may not call SetNewScreen from the ctor or Init(). (We don't do this
|
||||
// check inside PrepareScreen; that may be called from a thread for concurrent
|
||||
// loading, and the main thread may call SetNewScreen during that time.)
|
||||
ASSERT_M( m_sDelayedScreen.empty(), m_sDelayedScreen );
|
||||
// Emit an error instead of asserting. -Kyz
|
||||
if(!m_sDelayedScreen.empty())
|
||||
{
|
||||
LuaHelpers::ReportScriptError("Setting a new screen during an InitCommand is not allowed.");
|
||||
m_sDelayedScreen= "";
|
||||
}
|
||||
|
||||
bLoaded = ActivatePreparedScreenAndBackground( sScreenName );
|
||||
ASSERT( bLoaded );
|
||||
|
||||
Reference in New Issue
Block a user