fix "Set" caled twice
This commit is contained in:
@@ -231,13 +231,6 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD, int
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call "Set" so that elements can react to the change in song.
|
|
||||||
{
|
|
||||||
Message msg( "Set" );
|
|
||||||
msg.SetParam( "Song", data->m_pSong );
|
|
||||||
this->HandleMessage( msg );
|
|
||||||
}
|
|
||||||
|
|
||||||
Actor *pBars[] = { m_sprBar, m_sprExpandedBar, m_sprSectionBar, m_sprModeBar, m_sprSortBar, m_sprSongBar, NULL };
|
Actor *pBars[] = { m_sprBar, m_sprExpandedBar, m_sprSectionBar, m_sprModeBar, m_sprSortBar, m_sprSongBar, NULL };
|
||||||
for( unsigned i = 0; pBars[i] != NULL; ++i )
|
for( unsigned i = 0; pBars[i] != NULL; ++i )
|
||||||
pBars[i]->SetVisible( false );
|
pBars[i]->SetVisible( false );
|
||||||
@@ -286,7 +279,12 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD, int
|
|||||||
lua_setglobal( L, "ThisGameCommand" );
|
lua_setglobal( L, "ThisGameCommand" );
|
||||||
LUA->Release( L );
|
LUA->Release( L );
|
||||||
|
|
||||||
this->PlayCommand( "Set" );
|
// Call "Set" so that elements can react to the change in song.
|
||||||
|
{
|
||||||
|
Message msg( "Set" );
|
||||||
|
msg.SetParam( "Song", data->m_pSong );
|
||||||
|
this->HandleMessage( msg );
|
||||||
|
}
|
||||||
|
|
||||||
LUA->UnsetGlobal( "ThisGameCommand" );
|
LUA->UnsetGlobal( "ThisGameCommand" );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user