Player-side Autoplay modifier (allows one player to play normally, while the other is in autoplay mode)
This commit is contained in:
@@ -358,6 +358,7 @@ OsMountPlayer2=
|
|||||||
Persp=Persp
|
Persp=Persp
|
||||||
Player1Profile=
|
Player1Profile=
|
||||||
Player2Profile=
|
Player2Profile=
|
||||||
|
PlayerAutoPlay=PlayerAutoPlay
|
||||||
PreloadSounds=If YES, preload most sounds in advance. This increases load times, and should normally be left OFF.
|
PreloadSounds=If YES, preload most sounds in advance. This increases load times, and should normally be left OFF.
|
||||||
Premium=Premium
|
Premium=Premium
|
||||||
Profile=
|
Profile=
|
||||||
@@ -824,6 +825,7 @@ Play mods from course=Play mods from course
|
|||||||
Play selection=Play selection
|
Play selection=Play selection
|
||||||
Player1Profile=Player1 Profile
|
Player1Profile=Player1 Profile
|
||||||
Player2Profile=Player2 Profile
|
Player2Profile=Player2 Profile
|
||||||
|
PlayerAutoPlay=Player AutoPlay
|
||||||
Predicted Meter=Predicted Meter
|
Predicted Meter=Predicted Meter
|
||||||
Preferences=Preferences
|
Preferences=Preferences
|
||||||
PreloadSounds=Preload Sounds
|
PreloadSounds=Preload Sounds
|
||||||
|
|||||||
@@ -3468,7 +3468,7 @@ NextScreen=ScreenPlayerOptionsNext()
|
|||||||
PlayMusic=false
|
PlayMusic=false
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
ShowStyleIcon=false
|
ShowStyleIcon=false
|
||||||
LineNames="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16"
|
LineNames="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"
|
||||||
Line1="list,Speed"
|
Line1="list,Speed"
|
||||||
Line2="list,Accel"
|
Line2="list,Accel"
|
||||||
Line3="list,Effect"
|
Line3="list,Effect"
|
||||||
@@ -3480,11 +3480,12 @@ Line8="list,NoteSkins"
|
|||||||
Line9="list,Holds"
|
Line9="list,Holds"
|
||||||
Line10="list,Mines"
|
Line10="list,Mines"
|
||||||
Line11="list,Attacks"
|
Line11="list,Attacks"
|
||||||
Line12="list,Hide"
|
Line12="list,PlayerAutoPlay"
|
||||||
Line13="list,Persp"
|
Line13="list,Hide"
|
||||||
Line14="list,ScoreDisplay"
|
Line14="list,Persp"
|
||||||
Line15="list,Steps"
|
Line15="list,ScoreDisplay"
|
||||||
Line16="list,Characters"
|
Line16="list,Steps"
|
||||||
|
Line17="list,Characters"
|
||||||
|
|
||||||
[ScreenRaveOptions]
|
[ScreenRaveOptions]
|
||||||
Fallback="ScreenOptions"
|
Fallback="ScreenOptions"
|
||||||
@@ -3689,6 +3690,10 @@ AttacksDefault="mod,no randomattacks,no songattacks"
|
|||||||
Attacks,1="name,Off"
|
Attacks,1="name,Off"
|
||||||
Attacks,2="mod,randomattacks;name,RandomAttacks"
|
Attacks,2="mod,randomattacks;name,RandomAttacks"
|
||||||
Attacks,3="mod,songattacks;name,SongAttacks"
|
Attacks,3="mod,songattacks;name,SongAttacks"
|
||||||
|
PlayerAutoPlay="2"
|
||||||
|
PlayerAutoPlayDefault="mod,no playerautoplay"
|
||||||
|
PlayerAutoPlay,1="name,Off"
|
||||||
|
PlayerAutoPlay,2="mod,playerautoplay;name,On"
|
||||||
Hide="3"
|
Hide="3"
|
||||||
HideDefault="mod,no dark,no blind"
|
HideDefault="mod,no dark,no blind"
|
||||||
Hide,1="name,Off"
|
Hide,1="name,Off"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ void PlayerOptions::Init()
|
|||||||
m_fCover = 0; m_SpeedfCover = 1.0f;
|
m_fCover = 0; m_SpeedfCover = 1.0f;
|
||||||
m_fRandAttack = 0; m_SpeedfRandAttack = 1.0f;
|
m_fRandAttack = 0; m_SpeedfRandAttack = 1.0f;
|
||||||
m_fSongAttack = 0; m_SpeedfSongAttack = 1.0f;
|
m_fSongAttack = 0; m_SpeedfSongAttack = 1.0f;
|
||||||
|
m_fPlayerAutoPlay = 0; m_SpeedfPlayerAutoPlay = 1.0f;
|
||||||
m_bSetTiltOrSkew = false;
|
m_bSetTiltOrSkew = false;
|
||||||
m_fPerspectiveTilt = 0; m_SpeedfPerspectiveTilt = 1.0f;
|
m_fPerspectiveTilt = 0; m_SpeedfPerspectiveTilt = 1.0f;
|
||||||
m_fSkew = 0; m_SpeedfSkew = 1.0f;
|
m_fSkew = 0; m_SpeedfSkew = 1.0f;
|
||||||
@@ -65,6 +66,7 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
|||||||
APPROACH( fCover );
|
APPROACH( fCover );
|
||||||
APPROACH( fRandAttack );
|
APPROACH( fRandAttack );
|
||||||
APPROACH( fSongAttack );
|
APPROACH( fSongAttack );
|
||||||
|
APPROACH( fPlayerAutoPlay );
|
||||||
APPROACH( fPerspectiveTilt );
|
APPROACH( fPerspectiveTilt );
|
||||||
APPROACH( fSkew );
|
APPROACH( fSkew );
|
||||||
APPROACH( fPassmark );
|
APPROACH( fPassmark );
|
||||||
@@ -169,6 +171,7 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
|||||||
|
|
||||||
AddPart( AddTo, m_fRandAttack, "RandomAttacks" );
|
AddPart( AddTo, m_fRandAttack, "RandomAttacks" );
|
||||||
AddPart( AddTo, m_fSongAttack, "SongAttacks" );
|
AddPart( AddTo, m_fSongAttack, "SongAttacks" );
|
||||||
|
AddPart( AddTo, m_fPlayerAutoPlay, "PlayerAutoPlay" );
|
||||||
|
|
||||||
AddPart( AddTo, m_fPassmark, "Passmark" );
|
AddPart( AddTo, m_fPassmark, "Passmark" );
|
||||||
|
|
||||||
@@ -384,6 +387,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
|||||||
else if( sBit == "cover" ) SET_FLOAT( fCover )
|
else if( sBit == "cover" ) SET_FLOAT( fCover )
|
||||||
else if( sBit == "randomattacks" ) SET_FLOAT( fRandAttack )
|
else if( sBit == "randomattacks" ) SET_FLOAT( fRandAttack )
|
||||||
else if( sBit == "songattacks" ) SET_FLOAT( fSongAttack )
|
else if( sBit == "songattacks" ) SET_FLOAT( fSongAttack )
|
||||||
|
else if( sBit == "playerautoplay" ) SET_FLOAT( fPlayerAutoPlay )
|
||||||
else if( sBit == "passmark" ) SET_FLOAT( fPassmark )
|
else if( sBit == "passmark" ) SET_FLOAT( fPassmark )
|
||||||
else if( sBit == "overhead" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = 0; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
|
else if( sBit == "overhead" ) { m_bSetTiltOrSkew = true; m_fSkew = 0; m_fPerspectiveTilt = 0; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
|
||||||
else if( sBit == "incoming" ) { m_bSetTiltOrSkew = true; m_fSkew = level; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
|
else if( sBit == "incoming" ) { m_bSetTiltOrSkew = true; m_fSkew = level; m_fPerspectiveTilt = -level; m_SpeedfSkew = m_SpeedfPerspectiveTilt = speed; }
|
||||||
@@ -624,6 +628,7 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
|||||||
COMPARE(m_fCover);
|
COMPARE(m_fCover);
|
||||||
COMPARE(m_fRandAttack);
|
COMPARE(m_fRandAttack);
|
||||||
COMPARE(m_fSongAttack);
|
COMPARE(m_fSongAttack);
|
||||||
|
COMPARE(m_fPlayerAutoPlay);
|
||||||
COMPARE(m_fPerspectiveTilt);
|
COMPARE(m_fPerspectiveTilt);
|
||||||
COMPARE(m_fSkew);
|
COMPARE(m_fSkew);
|
||||||
COMPARE(m_sNoteSkin);
|
COMPARE(m_sNoteSkin);
|
||||||
@@ -674,6 +679,7 @@ bool PlayerOptions::IsEasierForSongAndSteps( Song* pSong, Steps* pSteps, PlayerN
|
|||||||
if( m_bTransforms[TRANSFORM_ECHO] ) return true;
|
if( m_bTransforms[TRANSFORM_ECHO] ) return true;
|
||||||
|
|
||||||
if( m_fCover ) return true;
|
if( m_fCover ) return true;
|
||||||
|
if( m_fPlayerAutoPlay ) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ public:
|
|||||||
float m_fCover, m_SpeedfCover; // hide the background per-player--can't think of a good name
|
float m_fCover, m_SpeedfCover; // hide the background per-player--can't think of a good name
|
||||||
float m_fRandAttack, m_SpeedfRandAttack;
|
float m_fRandAttack, m_SpeedfRandAttack;
|
||||||
float m_fSongAttack, m_SpeedfSongAttack;
|
float m_fSongAttack, m_SpeedfSongAttack;
|
||||||
|
float m_fPlayerAutoPlay, m_SpeedfPlayerAutoPlay;
|
||||||
bool m_bSetTiltOrSkew; // true if the tilt or skew was set by FromString
|
bool m_bSetTiltOrSkew; // true if the tilt or skew was set by FromString
|
||||||
float m_fPerspectiveTilt, m_SpeedfPerspectiveTilt; // -1 = near, 0 = overhead, +1 = space
|
float m_fPerspectiveTilt, m_SpeedfPerspectiveTilt; // -1 = near, 0 = overhead, +1 = space
|
||||||
float m_fSkew, m_SpeedfSkew; // 0 = vanish point is in center of player, 1 = vanish point is in center of screen
|
float m_fSkew, m_SpeedfSkew; // 0 = vanish point is in center of player, 1 = vanish point is in center of screen
|
||||||
|
|||||||
@@ -654,7 +654,8 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
|
|||||||
// handle combo logic
|
// handle combo logic
|
||||||
//
|
//
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
if( GamePreferences::m_AutoPlay != PC_HUMAN && !GAMESTATE->m_bDemonstrationOrJukebox ) // cheaters never prosper
|
if( (GamePreferences::m_AutoPlay != PC_HUMAN || m_pPlayerState->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay != 0)
|
||||||
|
&& !GAMESTATE->m_bDemonstrationOrJukebox ) // cheaters never prosper
|
||||||
{
|
{
|
||||||
m_iCurToastyCombo = 0;
|
m_iCurToastyCombo = 0;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2084,7 +2084,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
|||||||
|
|
||||||
GameButtonType gbt = GAMESTATE->m_pCurGame->GetPerButtonInfo(input.GameI.button)->m_gbt;
|
GameButtonType gbt = GAMESTATE->m_pCurGame->GetPerButtonInfo(input.GameI.button)->m_gbt;
|
||||||
|
|
||||||
if( GamePreferences::m_AutoPlay == PC_HUMAN )
|
if( GamePreferences::m_AutoPlay == PC_HUMAN && GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay == 0 )
|
||||||
{
|
{
|
||||||
const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI );
|
const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI );
|
||||||
bool bRelease = input.type == IET_RELEASE;
|
bool bRelease = input.type == IET_RELEASE;
|
||||||
@@ -2291,6 +2291,10 @@ m_pSoundMusic->StopPlaying();
|
|||||||
SetupCourseAttacks();
|
SetupCourseAttacks();
|
||||||
|
|
||||||
m_Player.Load( m_NoteDataEdit );
|
m_Player.Load( m_NoteDataEdit );
|
||||||
|
|
||||||
|
if( GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay != 0 )
|
||||||
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = PC_AUTOPLAY;
|
||||||
|
else
|
||||||
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = GamePreferences::m_AutoPlay;
|
GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||||
|
|
||||||
if( g_bEditorShowBGChangesPlay )
|
if( g_bEditorShowBGChangesPlay )
|
||||||
|
|||||||
@@ -1113,6 +1113,9 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if( pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay != 0 )
|
||||||
|
pi->GetPlayerState()->m_PlayerController = PC_AUTOPLAY;
|
||||||
|
else
|
||||||
pi->GetPlayerState()->m_PlayerController = GamePreferences::m_AutoPlay;
|
pi->GetPlayerState()->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2238,7 +2241,7 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
AbortGiveUp( true );
|
AbortGiveUp( true );
|
||||||
|
|
||||||
if( GamePreferences::m_AutoPlay == PC_HUMAN )
|
if( GamePreferences::m_AutoPlay == PC_HUMAN && GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay == 0 )
|
||||||
{
|
{
|
||||||
PlayerInfo& pi = GetPlayerInfoForInput( input );
|
PlayerInfo& pi = GetPlayerInfoForInput( input );
|
||||||
|
|
||||||
|
|||||||
@@ -167,8 +167,16 @@ void ScreenGameplayLesson::ChangeLessonPage( int iDir )
|
|||||||
|
|
||||||
// Change back to the current autoplay setting (in most cases, human controlled).
|
// Change back to the current autoplay setting (in most cases, human controlled).
|
||||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||||
|
{
|
||||||
|
/* Mike: I'm not sure if you can actually have the player options enabled in this mode,
|
||||||
|
* but I'm putting the check here anyways to play it safe. If it's unnecessary, then it
|
||||||
|
* should be removed. */
|
||||||
|
if( pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay != 0 )
|
||||||
|
pi->GetPlayerState()->m_PlayerController = PC_AUTOPLAY;
|
||||||
|
else
|
||||||
pi->GetPlayerState()->m_PlayerController = GamePreferences::m_AutoPlay;
|
pi->GetPlayerState()->m_PlayerController = GamePreferences::m_AutoPlay;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_vPages[m_iCurrentPageIndex]->PlayCommand( "Hide" );
|
m_vPages[m_iCurrentPageIndex]->PlayCommand( "Hide" );
|
||||||
|
|||||||
Reference in New Issue
Block a user