From 571f6a70985e453785abc4235c8c6bab96d532e5 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 17 Jun 2021 23:25:27 -0700 Subject: [PATCH] Re-add playtesting passthrough code block for non-separate interact This fixes a regression where you're unable to activate activity zones in in-editor playtesting if your interact button is not separate from the map button. When I originally did #743, I didn't have an option to set the bind to be non-separate, so I removed this logic without adding a game.separate_interact check. But when I added the option, I overlooked this code, and so this regression happened. Whoops. --- desktop_version/src/Input.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 50613e37..b03ec873 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -1960,8 +1960,18 @@ void gameinput(void) { if ((game.press_map || key.isDown(27)) && !game.mapheld) { - game.returntoeditor(); - game.mapheld = true; + if (!game.separate_interact + && game.press_map + && (INBOUNDS_VEC(game.activeactivity, obj.blocks) + || (game.activetele && game.readytotele > 20))) + { + /* Pass, let code block below handle it */ + } + else + { + game.returntoeditor(); + game.mapheld = true; + } } } #endif