From 827417fec848f3458aac2734f05736a78c5ca1c1 Mon Sep 17 00:00:00 2001 From: Dav999 Date: Sun, 10 Dec 2023 19:09:42 +0100 Subject: [PATCH] Restore gravity/warp lines sticking out a tile offscreen I just discovered this: whereas 2.3 and older versions make gravity and warp lines - when placed in the editor - stick out one tile offscreen, the latest version stops the lines at the room border. This change restores the old behavior, and it's a simple fix: the refactored code was written to let tiles outside the room block gravity/warp lines. Instead of all offscreen tiles blocking lines, now there's a 1-tile padding around the room that will let them through. --- desktop_version/src/Editor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index 7dbd6b5e..5266eb89 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -4039,6 +4039,11 @@ bool editorclass::lines_can_pass(int x, int y) { return tile == 0 || tile >= 680; } + if (x == -1 || y == -1 || x == SCREEN_WIDTH_TILES || y == SCREEN_HEIGHT_TILES) + { + // If lines go offscreen, they stick out one tile + return true; + } return false; }