don't unsubscribe from messages on bgchange
This commit is contained in:
@@ -47,6 +47,13 @@ void Actor::SetBGMLight( int iLightNumber, float fCabinetLights )
|
||||
}
|
||||
|
||||
void Actor::InitDefaults()
|
||||
{
|
||||
InitState();
|
||||
|
||||
UnsubscribeAll();
|
||||
}
|
||||
|
||||
void Actor::InitState()
|
||||
{
|
||||
StopTweening();
|
||||
|
||||
@@ -88,8 +95,6 @@ void Actor::InitDefaults()
|
||||
m_ZTestMode = ZTEST_OFF;
|
||||
m_bZWrite = false;
|
||||
m_CullMode = CULL_NONE;
|
||||
|
||||
UnsubscribeAll();
|
||||
}
|
||||
|
||||
static bool GetMessageNameFromCommandName( const RString &sCommandName, RString &sMessageNameOut )
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
virtual ~Actor();
|
||||
virtual Actor *Copy() const;
|
||||
virtual void InitDefaults();
|
||||
virtual void InitState();
|
||||
virtual void LoadFromNode( const RString& sDir, const XNode* pNode );
|
||||
bool IsType( const RString &sType );
|
||||
|
||||
|
||||
@@ -74,6 +74,13 @@ void ActorFrame::InitDefaults()
|
||||
Actor::InitDefaults();
|
||||
}
|
||||
|
||||
void ActorFrame::InitState()
|
||||
{
|
||||
FOREACH( Actor*, m_SubActors, a )
|
||||
(*a)->InitState();
|
||||
Actor::InitState();
|
||||
}
|
||||
|
||||
void ActorFrame::LoadFromNode( const RString& sDir, const XNode* pNode )
|
||||
{
|
||||
if( AutoLoadChildren() )
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
virtual ~ActorFrame();
|
||||
|
||||
virtual void InitDefaults();
|
||||
virtual void InitState();
|
||||
void LoadFromNode( const RString& sDir, const XNode* pNode );
|
||||
virtual Actor *Copy() const;
|
||||
|
||||
|
||||
@@ -810,7 +810,7 @@ void BackgroundImpl::Layer::UpdateCurBGChange( const Song *pSong, float fLastMus
|
||||
LUA->SetGlobal( "Color1", change.m_def.m_sColor1.empty() ? RString("1,1,1,1") : change.m_def.m_sColor1 );
|
||||
LUA->SetGlobal( "Color2", change.m_def.m_sColor2.empty() ? RString("1,1,1,1") : change.m_def.m_sColor2 );
|
||||
|
||||
m_pCurrentBGA->InitDefaults();
|
||||
m_pCurrentBGA->InitState();
|
||||
m_pCurrentBGA->PlayCommand( "On" );
|
||||
m_pCurrentBGA->PlayCommand( "GainFocus" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user