renderhitbox: fix raster errors at screen edge

This commit is contained in:
James R 2023-10-13 01:33:09 -07:00
parent b5c28eeea8
commit bdf2e87cb8

View file

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