From 234f303348d1360c16003e998198055fbd969ba4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 21 May 2021 18:40:34 +0200 Subject: [PATCH] - fixed typo in line segment culler. --- source/core/nodebuilder/nodebuild.h | 1 + source/core/sectorgeometry.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/core/nodebuilder/nodebuild.h b/source/core/nodebuilder/nodebuild.h index 0b212ad2f..15e8d634a 100644 --- a/source/core/nodebuilder/nodebuild.h +++ b/source/core/nodebuilder/nodebuild.h @@ -132,6 +132,7 @@ struct line_t side_t* sidedef[2]; sectortype* frontsector, * backsector; int linenum; + int wallnum; int Index() const { return linenum; } diff --git a/source/core/sectorgeometry.cpp b/source/core/sectorgeometry.cpp index 93d68746e..68c1cb6c1 100644 --- a/source/core/sectorgeometry.cpp +++ b/source/core/sectorgeometry.cpp @@ -353,6 +353,7 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector lines[j].backsector = nullptr; lines[j].frontsector = sectorp; lines[j].linenum = j; + lines[j].wallnum = sline->wall; lines[j].sidedef[0] = &sides[j]; lines[j].sidedef[1] = nullptr; lines[j].v1 = &vertexes[i]; @@ -416,7 +417,7 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector // In this case we have to delete the shorter line and truncate the other one. // check if the second line's end point is on the line we are checking - double d1 = PointOnLineSide(pp2, p1, p2); + double d1 = PointOnLineSide(pp1, p1, p2); if (fabs(d1) > FLT_EPSILON) continue; // not colinear bool vert = p1.X == p2.X; double p1x = vert ? p1.X : p1.Y;