From 67046751892251646bc8534e9cdaa64d30ab71d6 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 2 Aug 2020 21:43:55 -0700 Subject: [PATCH] Remove half-second delay when exiting to menu in glitchrunner mode The half-second delay comes from the fact that the game uses graphics.resumegamemode to go back to GAMEMODE. This system waits for graphics.menuoffset to reach a certain threshold before actually going back (this is the animation of the map screen being brought down). To speed it up, I'll just set graphics.menuoffset directly. I could've directly set game.gamestate to GAMEMODE, but I wanted to be safe and use the existing system instead. --- desktop_version/src/Input.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index b23d5bbb..d248ecf4 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -2027,9 +2027,10 @@ void mapinput() // glitchrunner mode. // Also have to check graphics.menuoffset so this doesn't run every frame - // Have to close the menu in order to run gamestates. This adds - // about an extra half second of completely black screen. + // Have to close the menu in order to run gamestates graphics.resumegamemode = true; + // Remove half-second delay + graphics.menuoffset = 250; // Technically this was in <=2.2 as well obj.removeallblocks();