From e6b1b54214fe79e8b5da2e7c54eecce273d90cfd Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 29 Dec 2023 13:51:48 -0800 Subject: [PATCH] Add a fast-forward keybind to level debugger This lets you hold down F to fast-forward the game if you have the level debugger interface open (with Y) and the game isn't paused. This is most useful for quickly skipping through cutscenes to test something. --- desktop_version/src/Game.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 097a16bc..e3017e25 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -7503,6 +7503,14 @@ static inline int get_framerate(const int slowdown) int Game::get_timestep(void) { + if ((gamestate == GAMEMODE || (gamestate == TELEPORTERMODE && !useteleporter)) && + level_debugger::is_active() && + !level_debugger::is_pausing() && + key.isDown(SDLK_f)) + { + return 1; + } + switch (gamestate) { case GAMEMODE: