- fixed typo in line segment culler.

This commit is contained in:
Christoph Oelckers 2021-05-21 18:40:34 +02:00
parent f7a424cd06
commit 234f303348
2 changed files with 3 additions and 1 deletions

View file

@ -132,6 +132,7 @@ struct line_t
side_t* sidedef[2];
sectortype* frontsector, * backsector;
int linenum;
int wallnum;
int Index() const { return linenum; }

View file

@ -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;