From 1ea3a6ed9211eda1084851d6205589c47a8f4e97 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 1 Apr 2003 20:10:35 +0000 Subject: [PATCH] never set FailMode harder than pref --- stepmania/src/ScreenSelectMusic.cpp | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index cf281bdf73..68284814f0 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -487,32 +487,32 @@ void ScreenSelectMusic::AdjustOptions() * player changes to a mode easier than the preference setting, we might * reset it to the preference later. XXX */ - // Note all these if()s are mutually exclusive. - /* No; the second if overrides the first, and the third overrides the first - * two. */ + /* 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) - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG; - + 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) - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; + 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; +// } - 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. */ - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_ARCADE; - } + GAMESTATE->m_SongOptions.m_FailType = max( ft, GAMESTATE->m_SongOptions.m_FailType ); } void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )