From 8563074ee0510d476e12d029e45768e27ff3034d Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 17 Apr 2022 21:57:06 +0100 Subject: [PATCH] Resolve #237 - water ripple effects no longer show garbage in splitscreen. --- src/r_plane.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/r_plane.c b/src/r_plane.c index ccd4994ce..0a4e8ef0d 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -921,8 +921,8 @@ void R_DrawSinglePlane(visplane_t *pl) if (top < 0) top = 0; - if (bottom > vid.height) - bottom = vid.height; + if (bottom > viewheight) + bottom = viewheight; // Only copy the part of the screen we need for (i = 0; i <= r_splitscreen; i++) @@ -956,9 +956,10 @@ void R_DrawSinglePlane(visplane_t *pl) offset = (scry*vid.width) + scrx; // No idea if this works - VID_BlitLinearScreen(screens[0] + offset, screens[1] + offset, - viewwidth, bottom-top, - vid.width, vid.width); + VID_BlitLinearScreen(screens[0] + offset, + screens[1] + (top*vid.width), // intentionally not +offset + viewwidth, bottom-top, + vid.width, vid.width); } } }