From 2cba586d9c3bd244e6aa52507895491eb32a3316 Mon Sep 17 00:00:00 2001 From: alufolie91 Date: Wed, 13 Sep 2023 03:54:12 +0200 Subject: [PATCH] im good at coding absolute bruh thing, but it somehow works, fixes the midtextures, and doesent kill performance lmao --- src/hardware/hw_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 40ec21cbe..6a254a285 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1075,7 +1075,8 @@ void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfa #endif #ifdef ESLOPE - if (endbheight >= endtop) + if (endbheight > endtop) + endbot = endtop; #endif if (bheight >= top) continue; @@ -1085,12 +1086,9 @@ void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, FSurfa if (bot < realbot) bot = realbot; - + #ifdef ESLOPE - endbot = endbheight; - - if (endbot < endrealbot) - endbot = endrealbot; + endbot = min(max(endbheight, endrealbot), endtop); #endif Surf->PolyColor.s.alpha = alpha;