diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 4d6244468..653353a2b 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -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();