mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 19:21:44 +00:00
- fixed typo in line segment culler.
This commit is contained in:
parent
f7a424cd06
commit
234f303348
2 changed files with 3 additions and 1 deletions
|
@ -132,6 +132,7 @@ struct line_t
|
||||||
side_t* sidedef[2];
|
side_t* sidedef[2];
|
||||||
sectortype* frontsector, * backsector;
|
sectortype* frontsector, * backsector;
|
||||||
int linenum;
|
int linenum;
|
||||||
|
int wallnum;
|
||||||
|
|
||||||
int Index() const { return linenum; }
|
int Index() const { return linenum; }
|
||||||
|
|
||||||
|
|
|
@ -353,6 +353,7 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector
|
||||||
lines[j].backsector = nullptr;
|
lines[j].backsector = nullptr;
|
||||||
lines[j].frontsector = sectorp;
|
lines[j].frontsector = sectorp;
|
||||||
lines[j].linenum = j;
|
lines[j].linenum = j;
|
||||||
|
lines[j].wallnum = sline->wall;
|
||||||
lines[j].sidedef[0] = &sides[j];
|
lines[j].sidedef[0] = &sides[j];
|
||||||
lines[j].sidedef[1] = nullptr;
|
lines[j].sidedef[1] = nullptr;
|
||||||
lines[j].v1 = &vertexes[i];
|
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.
|
// 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
|
// 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
|
if (fabs(d1) > FLT_EPSILON) continue; // not colinear
|
||||||
bool vert = p1.X == p2.X;
|
bool vert = p1.X == p2.X;
|
||||||
double p1x = vert ? p1.X : p1.Y;
|
double p1x = vert ? p1.X : p1.Y;
|
||||||
|
|
Loading…
Reference in a new issue