From 5f131b426b15e6c4a17dbd97b50a20da1f1f9f9e Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 11 Jul 2020 00:15:06 -0700 Subject: [PATCH] Allow pressing Enter on teleporters during playtesting There's no reason you shouldn't be allowed to press Enter on teleporters during playtesting. Well, except that you can press Esc in the teleporter menu in order to go to the pause menu, which isn't intended in playtesting. But I can just add a check there so that pressing Esc closes the teleporter menu instead, it's fine. --- desktop_version/src/Input.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 38936550..bf459ee3 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -1720,6 +1720,8 @@ void gameinput() //Return to level editor if (game.activeactivity > -1 && game.press_map){ //pass, let code block below handle it + }else if(game.activetele && game.readytotele > 20 && game.press_map){ + //pass, let code block below handle it }else{ game.shouldreturntoeditor = true; game.mapheld = true; @@ -2332,10 +2334,18 @@ void teleporterinput() if (key.isDown(27)) { - // Go to "Do you want to quit?" screen - game.mapheld = true; - game.menupage = 10; - game.gamestate = MAPMODE; + if (!map.custommode || map.custommodeforreal) + { + // Go to "Do you want to quit?" screen + game.mapheld = true; + game.menupage = 10; + game.gamestate = MAPMODE; + } + else + { + // Close teleporter menu + graphics.resumegamemode = true; + } } } else