From e7f74c9d487f8c5e605ee76c24136ec98c1fb8c8 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 10 Jan 2006 20:52:53 +0000 Subject: [PATCH] only accept start from player 1 --- stepmania/src/ScreenEvaluationMultiplayer.cpp | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScreenEvaluationMultiplayer.cpp b/stepmania/src/ScreenEvaluationMultiplayer.cpp index fb1e3a6590..6ffbde97fd 100644 --- a/stepmania/src/ScreenEvaluationMultiplayer.cpp +++ b/stepmania/src/ScreenEvaluationMultiplayer.cpp @@ -12,7 +12,9 @@ #include "song.h" #include "ScoreKeeperNormal.h" #include "PercentageDisplay.h" - +#include "LocalizedString.h" +#include "InputEventPlus.h" +#include "ScreenManager.h" static const char *MultiplayerJudgeLineNames[] = { "W1", @@ -260,11 +262,33 @@ void ScreenEvaluationMultiplayer::HandleScreenMessage( const ScreenMessage SM ) ScreenWithMenuElements::HandleScreenMessage( SM ); } +static LocalizedString ONLY_PLAYER_1_CAN_CONTINUE ("ScreenJoinMultiplayer", "Only Player 1 can continue."); void ScreenEvaluationMultiplayer::Input( const InputEventPlus &input ) { if( this->IsTransitioning() ) return; + if( input.type == IET_FIRST_PRESS && + input.DeviceI.device >= DEVICE_JOY1 && + input.DeviceI.device < DEVICE_JOY1 + NUM_MultiPlayer && + input.MenuI.IsValid() ) + { + switch( input.MenuI.button ) + { + case MENU_BUTTON_START: + if( input.mp != MultiPlayer_1 ) + { + SCREENMAN->SystemMessage( ONLY_PLAYER_1_CAN_CONTINUE ); + SCREENMAN->PlayInvalidSound(); + } + else + { + MenuStart( GAMESTATE->m_MasterPlayerNumber ); + } + return; // input handled + } + } + ScreenWithMenuElements::Input( input ); }