this can use min/max

This commit is contained in:
Alug committed 2025-07-01 14:42:17 +02:00
1 parent f9161963b7
commit efaa12c6c7
1 file changed
+3 -7
+3 -7
View File
@@ -1096,6 +1096,7 @@ void R_DrawSinglePlane(drawspandata_t* ds, visplane_t *pl, boolean allow_paralle
// and mercilessly shoved into saturn by chearii 02-02-2025
{
INT32 trans = (10*((256+12) - pl->ffloor->alpha))/255;
if (trans >= 10)
return; // Don't even draw it
@@ -1132,13 +1133,8 @@ void R_DrawSinglePlane(drawspandata_t* ds, visplane_t *pl, boolean allow_paralle
spanfunctype = SPANDRAWFUNC_WATER;
// Copy the current scene, ugh
top = pl->high-8;
bottom = pl->low+8;
if (top < 0)
top = 0;
if (bottom > vid.height)
bottom = vid.height;
top = std::max(0, pl->high - 8);
bottom = std::min(viewheight, pl->low + 8);
// Only copy the part of the screen we need
UINT8 i = R_GetViewNumber();