Skip to content

Commit

Permalink
Use PlayerAI FailType to reduce mod setting consistency issues
Browse files Browse the repository at this point in the history
some mods save and some dont, so when you are defaulted on immediate then watch a failoff replay, you end up stuck on failoff and thats no good
  • Loading branch information
poco0317 committed Nov 24, 2019
1 parent 158ac01 commit 85a3aa6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ ScreenGameplayReplay::~ScreenGameplayReplay()
PlayerAI::oldNoteskin;
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetStage().m_sNoteSkin =
PlayerAI::oldNoteskin;
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetPreferred()
.m_FailType = PlayerAI::oldFailType;
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetCurrent().m_FailType =
PlayerAI::oldFailType;
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetSong().m_FailType =
PlayerAI::oldFailType;
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetStage().m_FailType =
PlayerAI::oldFailType;
}
GAMESTATE->m_SongOptions.Init();
GAMESTATE->m_SongOptions.GetPreferred().m_fMusicRate =
Expand Down
3 changes: 3 additions & 0 deletions src/Etterna/Screen/Others/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1709,11 +1709,14 @@ class LunaScreenSelectMusic : public Luna<ScreenSelectMusic>
PlayerAI::oldRate = oldRate;
auto ns =
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetPreferred().m_sNoteSkin;
auto ft =
GAMESTATE->m_pPlayerState->m_PlayerOptions.GetPreferred().m_FailType;
if (ns.empty())
ns = CommonMetrics::DEFAULT_NOTESKIN_NAME;
PlayerAI::oldNoteskin = ns;
RString hsMods = hs->GetModifiers();
PlayerAI::replayModifiers = hsMods;
PlayerAI::oldFailType = ft;

// lock the game into replay mode and GO
LOG->Trace("Viewing replay for score key %s",
Expand Down

0 comments on commit 85a3aa6

Please sign in to comment.