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.

This commit is contained in:
Andrew Livy
2009-05-16 23:32:56 +00:00
parent f931ff6e72
commit 994612eab3
+6
View File
@@ -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 );