From e85e95c0b22ea925b44becca7a8507be0e90dbac Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 28 Apr 2007 22:29:12 +0000 Subject: [PATCH] fix "Set" caled twice --- stepmania/src/MusicWheelItem.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index 22b8990365..82a3cbf21f 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -231,13 +231,6 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD, int 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 }; for( unsigned i = 0; pBars[i] != NULL; ++i ) pBars[i]->SetVisible( false ); @@ -286,7 +279,12 @@ void MusicWheelItem::LoadFromWheelItemData( const WheelItemBaseData *pWIBD, int lua_setglobal( L, "ThisGameCommand" ); 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" ); }