From 453f49cb779d08dd17eac401ebed8cb71e954875 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Mon, 12 Oct 2020 22:07:11 -0300 Subject: [PATCH] Fix floorsprites not being rendered when viewed from the bottom --- src/r_splats.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/r_splats.c b/src/r_splats.c index 0b2826107..cddbbf85f 100644 --- a/src/r_splats.c +++ b/src/r_splats.c @@ -261,6 +261,13 @@ void R_RenderFloorSplat(floorsplat_t *pSplat, vertex_t *verts, vissprite_t *vis) x1 = rastertab[y].minx>>FRACBITS; x2 = rastertab[y].maxx>>FRACBITS; + if (x1 > x2) + { + INT32 swap = x1; + x1 = x2; + x2 = swap; + } + if (x1 < 0) x1 = 0; if (x2 >= vid.width)