summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-12 10:43:17 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-12 10:43:17 +0200
commit9a1b826021a721a29271cb2c3af027c87f6d1d97 (patch)
tree0fc2c2f88ffec0e28bd6061cf058c2c1a965a207
parentlil fix (diff)
parentmission retry fix (diff)
downloadre3-9a1b826021a721a29271cb2c3af027c87f6d1d97.tar
re3-9a1b826021a721a29271cb2c3af027c87f6d1d97.tar.gz
re3-9a1b826021a721a29271cb2c3af027c87f6d1d97.tar.bz2
re3-9a1b826021a721a29271cb2c3af027c87f6d1d97.tar.lz
re3-9a1b826021a721a29271cb2c3af027c87f6d1d97.tar.xz
re3-9a1b826021a721a29271cb2c3af027c87f6d1d97.tar.zst
re3-9a1b826021a721a29271cb2c3af027c87f6d1d97.zip
-rw-r--r--src/control/Script.cpp1
-rw-r--r--src/core/Frontend.cpp20
-rw-r--r--src/core/Frontend.h4
3 files changed, 22 insertions, 3 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 5a61c2f7..0fa4de6b 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -3444,6 +3444,7 @@ void RetryMission(int type, int unk)
if (type == MISSION_RETRY_TYPE_SUGGEST_TO_PLAYER) {
doingMissionRetry = true;
FrontEndMenuManager.m_nCurrScreen = MENUPAGE_MISSION_RETRY;
+ FrontEndMenuManager.m_bAttemptingMissionRetry = true;
FrontEndMenuManager.RequestFrontEndStartUp();
}
else if (type == MISSION_RETRY_TYPE_BEGIN_RESTARTING) {
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 3fb4bcbc..f30611fa 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -556,6 +556,10 @@ CMenuManager::CMenuManager()
#ifdef GAMEPAD_MENU
m_PrefsControllerType = CONTROLLER_XBOXONE;
#endif
+
+#ifdef MISSION_REPLAY
+ m_bAttemptingMissionRetry = false;
+#endif
}
void
@@ -587,11 +591,17 @@ CMenuManager::Initialise(void)
m_fMapCenterY = MENU_Y(225.0f);
CPad::StopPadsShaking();
#ifdef MISSION_REPLAY
- if (!m_OnlySaveMenu && m_nCurrScreen != MENUPAGE_MISSION_RETRY)
+ if (!m_OnlySaveMenu) {
+ if (m_nCurrScreen == MENUPAGE_MISSION_RETRY && m_bAttemptingMissionRetry)
+ m_bAttemptingMissionRetry = false;
+ else
+ m_nCurrScreen = MENUPAGE_NONE;
+ }
#else
if (!m_OnlySaveMenu)
-#endif
m_nCurrScreen = MENUPAGE_NONE;
+#endif
+
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_STARTING, 0);
DMAudio.Service();
@@ -4460,7 +4470,11 @@ CMenuManager::UserInput(void)
if (CPad::GetPad(0)->GetBackJustDown() || CPad::GetPad(0)->GetEscapeJustDown()) {
if (m_nCurrScreen != MENUPAGE_START_MENU && m_nCurrScreen != MENUPAGE_PAUSE_MENU && m_nCurrScreen != MENUPAGE_CHOOSE_SAVE_SLOT
&& m_nCurrScreen != MENUPAGE_SAVE_CHEAT_WARNING && m_nCurrScreen != MENUPAGE_SAVING_IN_PROGRESS
- && m_nCurrScreen != MENUPAGE_DELETING_IN_PROGRESS && m_nCurrScreen != MENUPAGE_OUTRO)
+ && m_nCurrScreen != MENUPAGE_DELETING_IN_PROGRESS && m_nCurrScreen != MENUPAGE_OUTRO
+#ifdef MISSION_REPLAY
+ && m_nCurrScreen != MENUPAGE_MISSION_RETRY
+#endif
+ )
{
m_bShowMouse = false;
goBack = true;
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 858d3fd9..31d6fa8d 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -711,6 +711,10 @@ public:
int8 m_nDisplayMSAALevel;
#endif
+#ifdef MISSION_REPLAY
+ bool m_bAttemptingMissionRetry;
+#endif
+
#ifdef GAMEPAD_MENU
enum
{