diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 90572889b8..0d3058a1ea 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1087,6 +1087,11 @@ bool GameState::IsDisqualified( PlayerNumber pn ) if( STATSMAN->m_CurStageStats.bGaveUp ) return true; +#ifndef DEBUG + if( STATSMAN->m_CurStageStats.bUsedAutoplay ) + return true; +#endif //DEBUG + const PlayerOptions &po = GAMESTATE->m_pPlayerState[pn]->m_StoredPlayerOptions; // Check the stored player options for disqualify. Don't disqualify because diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index f9b237f2e3..431c9ab4bb 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -578,6 +578,8 @@ void Player::Update( float fDeltaTime ) RageTimer now; 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. bIsHoldingButton = true; + if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY ) + STATSMAN->m_CurStageStats.bUsedAutoplay = true; } else { @@ -1505,7 +1509,8 @@ void Player::CrossedRow( int iNoteRow ) if( tn.type != TapNote::empty && tn.result.tns == TNS_None ) { Step( t, now ); - STATSMAN->m_CurStageStats.bUsedAutoplay = true; + if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY ) + STATSMAN->m_CurStageStats.bUsedAutoplay = true; } } } diff --git a/stepmania/src/ScreenDebugOverlay.cpp b/stepmania/src/ScreenDebugOverlay.cpp index f2ba2520fb..7c675d4ce5 100644 --- a/stepmania/src/ScreenDebugOverlay.cpp +++ b/stepmania/src/ScreenDebugOverlay.cpp @@ -51,7 +51,7 @@ public: g_pvpSubscribers->push_back( this ); } 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 RString GetDescription() = 0; virtual RString GetValue() = 0; @@ -73,17 +73,6 @@ static bool IsGameplay() 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 ); @@ -124,7 +113,6 @@ struct MapDebugToDI static MapDebugToDI g_Mappings; static LocalizedString IN_GAMEPLAY( "ScreenDebugOverlay", "%s in gameplay" ); -static LocalizedString IN_EDITOR_GAMEPLAY( "ScreenDebugOverlay", "%s in editor gameplay" ); static LocalizedString OR( "ScreenDebugOverlay", "or" ); static RString GetDebugButtonName( const IDebugLine *pLine ) { @@ -135,8 +123,6 @@ static RString GetDebugButtonName( const IDebugLine *pLine ) return s; case IDebugLine::gameplay_only: return ssprintf( IN_GAMEPLAY.GetValue(), s.c_str() ); - case IDebugLine::editor_gameplay_only: - return ssprintf( IN_EDITOR_GAMEPLAY.GetValue(), s.c_str() ); default: ASSERT(0); } @@ -201,7 +187,6 @@ void ScreenDebugOverlay::Init() (*p)->m_Button = g_Mappings.debugButton[iNextDebugButton++]; break; case IDebugLine::gameplay_only: - case IDebugLine::editor_gameplay_only: (*p)->m_Button = g_Mappings.gameplayButton[iNextGameplayButton++]; break; } @@ -371,10 +356,8 @@ bool ScreenDebugOverlay::OverlayInput( const InputEventPlus &input ) if( !IsGameplay() ) continue; break; - case IDebugLine::editor_gameplay_only: - if( !IsEditorGameplay() ) - continue; - break; + default: + ASSERT(0); } if( input.DeviceI == (*p)->m_Button ) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 73ba82733c..a2a96564b4 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -2331,9 +2331,6 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) else if( SM == SM_GoToNextScreen ) { 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 ) {