mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-02 13:12:50 +00:00
renderhitbox: fix raster errors at screen edge
This commit is contained in:
parent
b5c28eeea8
commit
bdf2e87cb8
1 changed files with 5 additions and 5 deletions
10
src/r_bbox.c
10
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue