diff --git a/src/r_segs.cpp b/src/r_segs.cpp index b4f8cdbcd..d1cbbf9c2 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -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;