Only subscribe to PlayerJoined a single time.
This commit is contained in:
@@ -28,7 +28,9 @@ void ScreenSelect::Init()
|
|||||||
split( UPDATE_ON_MESSAGE, ",", m_asSubscribedMessages );
|
split( UPDATE_ON_MESSAGE, ",", m_asSubscribedMessages );
|
||||||
for( unsigned i = 0; i < m_asSubscribedMessages.size(); ++i )
|
for( unsigned i = 0; i < m_asSubscribedMessages.size(); ++i )
|
||||||
MESSAGEMAN->Subscribe( this, m_asSubscribedMessages[i] );
|
MESSAGEMAN->Subscribe( this, m_asSubscribedMessages[i] );
|
||||||
this->SubscribeToMessage( Message_PlayerJoined );
|
// Only subscribe once.
|
||||||
|
if( !this->IsSubscribedToMessage(Message_PlayerJoined) )
|
||||||
|
this->SubscribeToMessage( Message_PlayerJoined );
|
||||||
|
|
||||||
//
|
//
|
||||||
// Load choices
|
// Load choices
|
||||||
|
|||||||
Reference in New Issue
Block a user