don't unsubscribe from messages on bgchange

This commit is contained in:
Chris Danford
2006-05-30 09:08:00 +00:00
parent 7540f787dd
commit a5f0d301c9
5 changed files with 17 additions and 3 deletions
+7 -2
View File
@@ -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 )
+1
View File
@@ -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 );
+7
View File
@@ -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() )
+1
View File
@@ -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;
+1 -1
View File
@@ -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" );