1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

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

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