diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index d3359eb42a..4679008fbb 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -59,6 +59,7 @@ void GameState::Reset() // m_iCoins = 0; // don't reset coin count! m_MasterPlayerNumber = PLAYER_INVALID; m_sPreferredGroup = GROUP_ALL_MUSIC; + m_bChangedFailMode = false; for( p=0; pm_pCurNotes[p]->GetDifficulty()); } - /* This can still interfere a bit with the song options menu; eg. if a - * player changes to a mode easier than the preference setting, we might - * reset it to the preference later. XXX */ + LOG->Trace( "AdjustOptions: difficulty %i", dc ); + if( !GAMESTATE->m_bChangedFailMode ) + { + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_ARCADE; - /* Never set the FailType harder than the preference. */ - SongOptions::FailType ft = SongOptions::FAIL_ARCADE; + /* Easy and beginner are never harder than FAIL_END_OF_SONG. */ + if(dc <= DIFFICULTY_EASY) + { + LOG->Trace( "AdjustOptions: EOS" ); + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG; + } - /* Easy and beginner are never harder than FAIL_END_OF_SONG. */ - if(dc <= DIFFICULTY_EASY) - ft = SongOptions::FAIL_END_OF_SONG; - /* If beginner's steps were chosen, and this is the first stage, - * turn off failure completely--always give a second try. */ - if(dc == DIFFICULTY_BEGINNER && - PREFSMAN->m_bEventMode && /* stage index is meaningless in event mode */ - GAMESTATE->m_iCurrentStageIndex == 0) - ft = SongOptions::FAIL_OFF; -// Redundant. -Chris -// else if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2()) -// { -// /* Extra stage. We need to make sure we undo any changes above from -// * previous rounds; eg. where one player is on beginner and the other -// * is on hard, we've changed the fail mode in previous rounds and we -// * want to reset it for the extra stage. -// * -// * Besides, extra stage should probably always be FAIL_ARCADE anyway, -// * unless the extra stage course says otherwise. */ -// ft = SongOptions::FAIL_ARCADE; -// } - - GAMESTATE->m_SongOptions.m_FailType = max( ft, GAMESTATE->m_SongOptions.m_FailType ); + /* If beginner's steps were chosen, and this is the first stage, + * turn off failure completely--always give a second try. */ + if(dc == DIFFICULTY_BEGINNER && + !PREFSMAN->m_bEventMode && /* stage index is meaningless in event mode */ + GAMESTATE->m_iCurrentStageIndex == 0) + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; + } } void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM ) diff --git a/stepmania/src/ScreenSongOptions.cpp b/stepmania/src/ScreenSongOptions.cpp index 83f266ccf6..0840b30808 100644 --- a/stepmania/src/ScreenSongOptions.cpp +++ b/stepmania/src/ScreenSongOptions.cpp @@ -101,7 +101,12 @@ void ScreenSongOptions::ExportOptions() so.m_LifeType = (SongOptions::LifeType)m_iSelectedOption[0][SO_LIFE]; so.m_DrainType = (SongOptions::DrainType)m_iSelectedOption[0][SO_DRAIN]; so.m_iBatteryLives = m_iSelectedOption[0][SO_BAT_LIVES]+1; - so.m_FailType = (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL]; + if( so.m_FailType != (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL] ) + { + /* The user is changing the fail mode explicitly; stop messing with it. */ + GAMESTATE->m_bChangedFailMode = true; + so.m_FailType = (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL]; + } so.m_bAssistTick = !!m_iSelectedOption[0][SO_ASSIST]; so.m_bAutoSync = !!m_iSelectedOption[0][SO_AUTOSYNC];