pass rover directly to check_fof_offscreen

This commit is contained in:
Alug committed 2025-10-16 13:38:24 +02:00
1 parent 58190bfbd7
commit 2a696f7c77
1 file changed
+4 -4
+4 -4
View File
@@ -2236,7 +2236,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
lowcutslope = std::max(worldbottomslope, worldlowslope) + viewz;
highcutslope = std::min(worldtopslope, worldhighslope) + viewz;
auto check_fof_offscreen = [&](INT32 bottom, INT32 bottomslope, INT32 top, INT32 topslope)
auto check_fof_offscreen = [&](ffloor_t* rover, INT32 bottom, INT32 bottomslope, INT32 top, INT32 topslope)
{
return ((P_GetFFloorTopZAt (rover, segleft .x, segleft .y) <= bottom + viewz
&& P_GetFFloorTopZAt (rover, segright.x, segright.y) <= bottomslope + viewz)
@@ -2376,7 +2376,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
continue;
// Oy vey.
if (check_fof_offscreen(worldbottom, worldbottomslope, worldtop, worldtopslope))
if (check_fof_offscreen(rover, worldbottom, worldbottomslope, worldtop, worldtopslope))
continue;
ds_p->thicksides[i] = rover;
@@ -2394,10 +2394,10 @@ void R_StoreWallRange(INT32 start, INT32 stop)
continue;
// Oy vey.
if (check_fof_offscreen(worldbottom, worldbottomslope, worldtop, worldtopslope))
if (check_fof_offscreen(rover, worldbottom, worldbottomslope, worldtop, worldtopslope))
continue;
if (check_fof_offscreen(worldlow, worldlowslope, worldhigh, worldhighslope))
if (check_fof_offscreen(rover, worldlow, worldlowslope, worldhigh, worldhighslope))
continue;
ds_p->thicksides[i] = rover;