From 6768a33f2d476e9a3ab84124994ee7c78a1bf528 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 29 Dec 2022 12:15:30 -0800 Subject: [PATCH] Reset savex, savey, and savegc in hardreset While refactoring scriptclass::startgamemode, I noticed that these variables weren't being reset. Fortunately, this doesn't seem to have affected anything because they get overwritten one way or another in startgamemode. But it's good just to be defensive and reset them anyway. They are not reset in 2.2 or 2.0 glitchrunner mode because dying during exiting to the menu is needed for credits warp, and that means the checkpoint position needs to be maintained through. --- desktop_version/src/Script.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index bacd4e97..70a113d1 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -3163,6 +3163,9 @@ void scriptclass::hardreset(void) // Ironically, resetting more variables makes the janky fadeout system in glitchrunnermode even more glitchy game.saverx = 0; game.savery = 0; + game.savex = 0; + game.savey = 0; + game.savegc = 0; } game.savecolour = 0;