From 04f43dae6110c016df3743815be15230fc232e2e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 11 Jun 2008 22:02:37 +0000 Subject: [PATCH] always move on if a player joins in SAttract, even if it's not the screen who caused it --- stepmania/src/ScreenAttract.cpp | 9 +++++++++ stepmania/src/ScreenAttract.h | 1 + 2 files changed, 10 insertions(+) diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 7c09680a27..cf6c8a0cb8 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -22,6 +22,7 @@ void ScreenAttract::Init() { RESET_GAME_STATE.Load( m_sName, "ResetGameState" ); ATTRACT_VOLUME.Load( m_sName, "AttractVolume" ); + this->SubscribeToMessage( Message_PlayerJoined ); ScreenWithMenuElements::Init(); } @@ -124,6 +125,14 @@ void ScreenAttract::StartPlayingMusic() ScreenWithMenuElements::StartPlayingMusic(); } +void ScreenAttract::HandleMessage( const Message &msg ) +{ + if( msg == Message_PlayerJoined ) + this->Cancel( SM_GoToStartScreen ); + + ScreenWithMenuElements::HandleMessage( msg ); +} + void ScreenAttract::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_MenuTimer || diff --git a/stepmania/src/ScreenAttract.h b/stepmania/src/ScreenAttract.h index df473f3310..762258d9f1 100644 --- a/stepmania/src/ScreenAttract.h +++ b/stepmania/src/ScreenAttract.h @@ -18,6 +18,7 @@ public: static void SetAttractVolume( bool bInAttract ); virtual void Input( const InputEventPlus &input ); + virtual void HandleMessage( const Message &msg ); virtual void HandleScreenMessage( const ScreenMessage SM ); virtual void Cancel( ScreenMessage smSendWhenDone );