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.
This commit is contained in:
Dav999 2023-12-10 19:09:42 +01:00 committed by Misa Elizabeth Kai
parent 82aef30649
commit 827417fec8
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}