From d51085f2a96048fd79460a887dcb3904178d4fff Mon Sep 17 00:00:00 2001 From: DeaTh-G Date: Wed, 19 Mar 2025 10:42:48 +0100 Subject: [PATCH] reset session persistent shoe upgrade bools when achievements are reset --- UnleashedRecomp/user/achievement_manager.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/UnleashedRecomp/user/achievement_manager.cpp b/UnleashedRecomp/user/achievement_manager.cpp index 90759765..dbc6c242 100644 --- a/UnleashedRecomp/user/achievement_manager.cpp +++ b/UnleashedRecomp/user/achievement_manager.cpp @@ -1,5 +1,6 @@ #include "achievement_manager.h" #include +#include #include #include @@ -84,6 +85,24 @@ void AchievementManager::UnlockAll() void AchievementManager::Reset() { Data = {}; + + // The first usage of the shoe upgrades get stored within a session persistent boolean flag. + // This causes issues with popping the achievement for the use of these abilities when the player + // starts a new save file after they already used them in a session as these bools are never reset + // unless the game is exited. + // As a solution we reset these flags whenever the achievement data is being reset too. + + // Lay the Smackdown + *(bool*)g_memory.Translate(0x833647C5) = false; + + // Wall Crawler + *(bool*)g_memory.Translate(0x83363004) = false; + + // Airdevil + *(bool*)g_memory.Translate(0x833647BC) = false; + + // Hyperdrive + *(bool*)g_memory.Translate(0x833647C4) = false; } void AchievementManager::Load()