make autoplay available everywhere but DQ if used

This commit is contained in:
Chris Danford
2006-04-25 02:35:55 +00:00
parent 329d1397c0
commit c6bddd9165
4 changed files with 14 additions and 24 deletions
+5
View File
@@ -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
+6 -1
View File
@@ -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;
}
}
}
+3 -20
View File
@@ -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 )
-3
View File
@@ -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 )
{