From 5b2fbeb6b420399a0e9fb1e2d1bc9bcf559b7cde Mon Sep 17 00:00:00 2001 From: AllyTally Date: Sat, 9 Sep 2023 12:34:42 -0300 Subject: [PATCH] Fix gravity line edgeguides --- desktop_version/src/Editor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index 570dadaf..881485db 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -762,17 +762,17 @@ static void draw_edgeguides(void) } if (entity->rx == POS_MOD(ed.levx - 1, cl.mapwidth) // It's to the left... - && x + w >= 312) + && x + w >= SCREEN_WIDTH_PIXELS - 8) { // And touching the right edge! - graphics.fill_rect(x, entity->y * 8, 2, 8, green); + graphics.fill_rect(0, entity->y * 8, 2, 8, green); } else if (entity->rx == POS_MOD(ed.levx + 1, cl.mapwidth) // It's to the right... && x <= 0) { // And touching the left edge! - graphics.fill_rect(x + w - 2, entity->y * 8, 2, 8, green); + graphics.fill_rect(SCREEN_WIDTH_PIXELS - 2, entity->y * 8, 2, 8, green); } } }