diff --git a/src/r_bbox.c b/src/r_bbox.c index 2350d702e..3654565a8 100644 --- a/src/r_bbox.c +++ b/src/r_bbox.c @@ -56,11 +56,11 @@ raster_bbox_seg { y /= FRACUNIT; + h = y + (FixedCeil(abs(h)) / FRACUNIT); + if (y < 0) y = 0; - h = y + (FixedCeil(abs(h)) / FRACUNIT); - if (h >= viewheight) h = viewheight; @@ -124,9 +124,6 @@ draw_bbox_row x1 = a->x; x2 = b->x; - if (x2 >= viewwidth) - x2 = viewwidth - 1; - if (x1 == x2 || x1 >= viewwidth || x2 < 0) return; @@ -154,6 +151,9 @@ draw_bbox_row x1 = 0; } + if (x2 >= viewwidth) + x2 = viewwidth - 1; + while (x1 < x2) { raster_bbox_seg(x1, y1, s1, bb->color);