From 04103692fe3fea242bea16010e41046c61f93e65 Mon Sep 17 00:00:00 2001 From: Julia Nechaevskaya Date: Thu, 8 Jun 2023 21:35:44 +0300 Subject: [PATCH] Heretic: fix grid disappearing at the corners of the automap --- src/heretic/am_map.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/heretic/am_map.c b/src/heretic/am_map.c index aa56b67d..fa385860 100644 --- a/src/heretic/am_map.c +++ b/src/heretic/am_map.c @@ -1259,8 +1259,7 @@ void AM_drawGrid(int color) // Figure out start of vertical gridlines start = m_x; if ((start - bmaporgx) % (MAPBLOCKUNITS << FRACBITS)) - start += (MAPBLOCKUNITS << FRACBITS) - - ((start - bmaporgx) % (MAPBLOCKUNITS << FRACBITS)); + start -= ((start - bmaporgx) % (MAPBLOCKUNITS << FRACBITS)); end = m_x + m_w; // draw vertical gridlines @@ -1276,8 +1275,7 @@ void AM_drawGrid(int color) // Figure out start of horizontal gridlines start = m_y; if ((start - bmaporgy) % (MAPBLOCKUNITS << FRACBITS)) - start += (MAPBLOCKUNITS << FRACBITS) - - ((start - bmaporgy) % (MAPBLOCKUNITS << FRACBITS)); + start -= ((start - bmaporgy) % (MAPBLOCKUNITS << FRACBITS)); end = m_y + m_h; // draw horizontal gridlines