Workaround: let P2 use P1's menu buttons for changing P2's own difficulty, but only when P1 isn't around.

This commit is contained in:
Charles Lohr
2005-03-31 21:01:11 +00:00
parent a50beea26a
commit fbb611cf24
2 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -11,6 +11,7 @@
#include "MenuTimer.h"
#include "NetworkSyncManager.h"
#include "RageUtil.h"
#include "GameState.h"
#define CHATINPUT_WIDTH THEME->GetMetricF(m_sName,"ChatInputBoxWidth")
#define CHATINPUT_HEIGHT THEME->GetMetricF(m_sName,"ChatInputBoxHeight")
@@ -169,7 +170,12 @@ void ScreenNetSelectBase::Input( const DeviceInput& DeviceI, const InputEventTyp
m_sTextInput += c;
UpdateTextInput();
}
if( c >= ' ' )
//Tricky: If both players are playing, allow the 2 button through to the keymapper
if( c == '2' && GAMESTATE->IsPlayerEnabled( PLAYER_2 ) && GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
break;
if( c >= ' ' )
return;
break;
}
+8
View File
@@ -339,6 +339,14 @@ void ScreenNetSelectMusic::MenuUp( PlayerNumber pn, const InputEventType type )
void ScreenNetSelectMusic::MenuDown( PlayerNumber pn, const InputEventType type )
{
/*Tricky: If we have a player on player 2, and there is only
player 2, allow them to use player 1's controls to change
their difficulty. */
if ( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
pn = PLAYER_2;
if ( GAMESTATE->m_pCurSong == NULL )
return;
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;