From cabf0cdcb8c633ca096cd27bfce576d36e25495a Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 29 Nov 2019 00:42:21 -0600 Subject: [PATCH] Allow RestartGameplay in Multiplayer tested for like 3 minutes and this doesnt break as many things as I expected so it gets a pass keep in mind the tiny simplification made to restartgameplay here opens up a funny exploit that big brained themers can use to make fun of us for having an easy to break game but whatever --- .../Screen/Gameplay/ScreenGameplay.cpp | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp b/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp index d8693c5084..3f45e7d2b4 100644 --- a/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp +++ b/src/Etterna/Screen/Gameplay/ScreenGameplay.cpp @@ -1264,7 +1264,10 @@ void ScreenGameplay::RestartGameplay() { GAMESTATE->m_bRestartedGameplay = true; - SCREENMAN->GetTopScreen()->SetPrevScreenName("ScreenStageInformation"); + if (m_sName.find("Net") != std::string::npos) + SetPrevScreenName("ScreenNetStageInformation"); + else + SetPrevScreenName("ScreenStageInformation"); BeginBackingOutFromGameplay(); } @@ -1373,21 +1376,16 @@ ScreenGameplay::Input(const InputEventPlus& input) return false; } - // RestartGameplay may only be pressed when in Singleplayer. - // Clever theming or something can probably break this, but we should at - // least try. - if (SCREENMAN->GetTopScreen()->GetPrevScreen() == "ScreenSelectMusic") { - /* Restart gameplay button moved from theme to allow for rebinding for - * people who dont want to edit lua files :) - */ - bool bHoldingRestart = false; - if (GAMESTATE->GetCurrentStyle(input.pn)->GameInputToColumn( - input.GameI) == Column_Invalid) { - bHoldingRestart |= input.MenuI == GAME_BUTTON_RESTART; - } - if (bHoldingRestart) { - RestartGameplay(); - } + /* Restart gameplay button moved from theme to allow for rebinding for + * people who dont want to edit lua files :) + */ + bool bHoldingRestart = false; + if (GAMESTATE->GetCurrentStyle(input.pn)->GameInputToColumn(input.GameI) == + Column_Invalid) { + bHoldingRestart |= input.MenuI == GAME_BUTTON_RESTART; + } + if (bHoldingRestart) { + RestartGameplay(); } // handle a step or battle item activate