From 924b8105c535d69140e28a7d190a8a7150f09e46 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 29 Jun 2016 11:34:14 +0300 Subject: [PATCH] Fixed splitting of complex walls in compatibility renderer Example: +warp 2720 -200 -32 on Extreme Terror https://www.doomworld.com/idgames/levels/doom2/Ports/d-f/exterror --- src/gl/scene/gl_walls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index 1abbb2e5f..a688a036b 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -272,7 +272,7 @@ void GLWall::SplitWallComplex(sector_t * frontsector, bool translucent, float ma if ((maplightbottomleftztop[1]) || (maplightbottomleft>ztop[0] && maplightbottomright(fabsf(glseg.x2 - glseg.x1), fabsf(glseg.y2 - glseg.y2)); + float clen = MAX(fabsf(glseg.x2 - glseg.x1), fabsf(glseg.y2 - glseg.y1)); float dch = ztop[1] - ztop[0]; float dfh = maplightbottomright - maplightbottomleft; @@ -312,7 +312,7 @@ void GLWall::SplitWallComplex(sector_t * frontsector, bool translucent, float ma if ((maplightbottomleftzbottom[1]) || (maplightbottomleft>zbottom[0] && maplightbottomright(fabsf(glseg.x2 - glseg.x1), fabsf(glseg.y2 - glseg.y2)); + float clen = MAX(fabsf(glseg.x2 - glseg.x1), fabsf(glseg.y2 - glseg.y1)); float dch = zbottom[1] - zbottom[0]; float dfh = maplightbottomright - maplightbottomleft;