From 994612eab3c5cd57744e08fc184edb3f688a2884 Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Sat, 16 May 2009 23:32:56 +0000 Subject: [PATCH] Hack: if late joining on music select, often a themer will want to perform some sort of action. Using PlayerJoined keeps the actor lurking/leaking for each game, this overcomes the problem by localising the command. --- stepmania/src/ScreenSelectMusic.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 67bcb70c51..9ba96a2496 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -796,6 +796,12 @@ void ScreenSelectMusic::HandleMessage( const Message &msg ) Steps* pSteps = m_vpSteps.empty()? NULL: m_vpSteps[m_iSelection[pn]]; GAMESTATE->m_pCurSteps[pn].Set( pSteps ); } + + // hack-hack: if using a sound in a lua script which plays on PlayerJoined + // a copy of the sound ends up floating forever more (thus leaking through + // each game play) using a localised version of the join command seems + // to overcome this. + this->PlayCommand( "SSMPlayerJoined" ); } ScreenWithMenuElements::HandleMessage( msg );