make autoplay available everywhere but DQ if used
This commit is contained in:
@@ -1087,6 +1087,11 @@ bool GameState::IsDisqualified( PlayerNumber pn )
|
|||||||
if( STATSMAN->m_CurStageStats.bGaveUp )
|
if( STATSMAN->m_CurStageStats.bGaveUp )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
#ifndef DEBUG
|
||||||
|
if( STATSMAN->m_CurStageStats.bUsedAutoplay )
|
||||||
|
return true;
|
||||||
|
#endif //DEBUG
|
||||||
|
|
||||||
const PlayerOptions &po = GAMESTATE->m_pPlayerState[pn]->m_StoredPlayerOptions;
|
const PlayerOptions &po = GAMESTATE->m_pPlayerState[pn]->m_StoredPlayerOptions;
|
||||||
|
|
||||||
// Check the stored player options for disqualify. Don't disqualify because
|
// Check the stored player options for disqualify. Don't disqualify because
|
||||||
|
|||||||
@@ -578,6 +578,8 @@ void Player::Update( float fDeltaTime )
|
|||||||
|
|
||||||
RageTimer now;
|
RageTimer now;
|
||||||
Step( iTrack, now, false );
|
Step( iTrack, now, false );
|
||||||
|
if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY )
|
||||||
|
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,6 +621,8 @@ void Player::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
// TODO: Make the CPU miss sometimes.
|
// TODO: Make the CPU miss sometimes.
|
||||||
bIsHoldingButton = true;
|
bIsHoldingButton = true;
|
||||||
|
if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY )
|
||||||
|
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1505,7 +1509,8 @@ void Player::CrossedRow( int iNoteRow )
|
|||||||
if( tn.type != TapNote::empty && tn.result.tns == TNS_None )
|
if( tn.type != TapNote::empty && tn.result.tns == TNS_None )
|
||||||
{
|
{
|
||||||
Step( t, now );
|
Step( t, now );
|
||||||
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY )
|
||||||
|
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
g_pvpSubscribers->push_back( this );
|
g_pvpSubscribers->push_back( this );
|
||||||
}
|
}
|
||||||
virtual ~IDebugLine() { }
|
virtual ~IDebugLine() { }
|
||||||
enum Type { all_screens, gameplay_only, editor_gameplay_only };
|
enum Type { all_screens, gameplay_only };
|
||||||
virtual Type GetType() const { return all_screens; }
|
virtual Type GetType() const { return all_screens; }
|
||||||
virtual RString GetDescription() = 0;
|
virtual RString GetDescription() = 0;
|
||||||
virtual RString GetValue() = 0;
|
virtual RString GetValue() = 0;
|
||||||
@@ -73,17 +73,6 @@ static bool IsGameplay()
|
|||||||
return SCREENMAN && SCREENMAN->GetTopScreen() && SCREENMAN->GetTopScreen()->GetScreenType() == gameplay;
|
return SCREENMAN && SCREENMAN->GetTopScreen() && SCREENMAN->GetTopScreen()->GetScreenType() == gameplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsEditorGameplay()
|
|
||||||
{
|
|
||||||
if( IsGameplay() )
|
|
||||||
{
|
|
||||||
RString s = SCREENMAN->GetTopScreen()->GetName();
|
|
||||||
if( s.find("ScreenEdit") != s.npos )
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenDebugOverlay );
|
REGISTER_SCREEN_CLASS( ScreenDebugOverlay );
|
||||||
|
|
||||||
@@ -124,7 +113,6 @@ struct MapDebugToDI
|
|||||||
static MapDebugToDI g_Mappings;
|
static MapDebugToDI g_Mappings;
|
||||||
|
|
||||||
static LocalizedString IN_GAMEPLAY( "ScreenDebugOverlay", "%s in gameplay" );
|
static LocalizedString IN_GAMEPLAY( "ScreenDebugOverlay", "%s in gameplay" );
|
||||||
static LocalizedString IN_EDITOR_GAMEPLAY( "ScreenDebugOverlay", "%s in editor gameplay" );
|
|
||||||
static LocalizedString OR( "ScreenDebugOverlay", "or" );
|
static LocalizedString OR( "ScreenDebugOverlay", "or" );
|
||||||
static RString GetDebugButtonName( const IDebugLine *pLine )
|
static RString GetDebugButtonName( const IDebugLine *pLine )
|
||||||
{
|
{
|
||||||
@@ -135,8 +123,6 @@ static RString GetDebugButtonName( const IDebugLine *pLine )
|
|||||||
return s;
|
return s;
|
||||||
case IDebugLine::gameplay_only:
|
case IDebugLine::gameplay_only:
|
||||||
return ssprintf( IN_GAMEPLAY.GetValue(), s.c_str() );
|
return ssprintf( IN_GAMEPLAY.GetValue(), s.c_str() );
|
||||||
case IDebugLine::editor_gameplay_only:
|
|
||||||
return ssprintf( IN_EDITOR_GAMEPLAY.GetValue(), s.c_str() );
|
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
@@ -201,7 +187,6 @@ void ScreenDebugOverlay::Init()
|
|||||||
(*p)->m_Button = g_Mappings.debugButton[iNextDebugButton++];
|
(*p)->m_Button = g_Mappings.debugButton[iNextDebugButton++];
|
||||||
break;
|
break;
|
||||||
case IDebugLine::gameplay_only:
|
case IDebugLine::gameplay_only:
|
||||||
case IDebugLine::editor_gameplay_only:
|
|
||||||
(*p)->m_Button = g_Mappings.gameplayButton[iNextGameplayButton++];
|
(*p)->m_Button = g_Mappings.gameplayButton[iNextGameplayButton++];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -371,10 +356,8 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input )
|
|||||||
if( !IsGameplay() )
|
if( !IsGameplay() )
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
case IDebugLine::editor_gameplay_only:
|
default:
|
||||||
if( !IsEditorGameplay() )
|
ASSERT(0);
|
||||||
continue;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( input.DeviceI == (*p)->m_Button )
|
if( input.DeviceI == (*p)->m_Button )
|
||||||
|
|||||||
@@ -2331,9 +2331,6 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
else if( SM == SM_GoToNextScreen )
|
else if( SM == SM_GoToNextScreen )
|
||||||
{
|
{
|
||||||
GAMESTATE->m_EditMode = EditMode_INVALID;
|
GAMESTATE->m_EditMode = EditMode_INVALID;
|
||||||
|
|
||||||
// HACK to fix "AutoPlay remains on for normal play even if it's only togglable in the editor."
|
|
||||||
PREFSMAN->m_AutoPlay.Set( PC_HUMAN );
|
|
||||||
}
|
}
|
||||||
else if( SM == SM_BackFromMainMenu )
|
else if( SM == SM_BackFromMainMenu )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user