From e2061dbcc6e556a793a200b447f06c6e1234389f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 14 Jan 2022 22:56:00 +0100 Subject: [PATCH] - fixed bad wall array access when handling a sector that got split up. --- source/core/rendering/scene/hw_bunchdrawer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/rendering/scene/hw_bunchdrawer.cpp b/source/core/rendering/scene/hw_bunchdrawer.cpp index d8e14fd62..1d4300eb7 100644 --- a/source/core/rendering/scene/hw_bunchdrawer.cpp +++ b/source/core/rendering/scene/hw_bunchdrawer.cpp @@ -252,7 +252,7 @@ int BunchDrawer::ClipLine(int aline, bool portal) // Note: These walls may be excluded from the clipper, but not from being drawn! // if sectors got dragged around there may be overlaps which this code does not handle well do it may not run on such sectors. bool dontclip = false; - if (sectStartAngle != -1 && !(wall[line].sectorp()->exflags & SECTOREX_DRAGGED)) + if (sectStartAngle != -1 && (sector[sections[section].sector].exflags & SECTOREX_DRAGGED)) { if ((sectStartAngle > endAngle || sectEndAngle < startAngle)) {