Skip to content

Commit

Permalink
build EndpointLines correctly for lines that aren't part of a polygon…
Browse files Browse the repository at this point in the history
… when loading (fixes SF 2906089)
  • Loading branch information
treellama committed Dec 3, 2009
1 parent 818bce3 commit 3ae8406
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Level.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,14 @@ public void Load(Wadfile.DirectoryEntry wad) {
Line line = Lines[polygon.LineIndexes[i]];
EndpointPolygons[line.EndpointIndexes[0]].Add(polygon);
EndpointPolygons[line.EndpointIndexes[1]].Add(polygon);
EndpointLines[line.EndpointIndexes[0]].Add(line);
EndpointLines[line.EndpointIndexes[1]].Add(line);
}
}

foreach (Line line in Lines) {
EndpointLines[line.EndpointIndexes[0]].Add(line);
EndpointLines[line.EndpointIndexes[1]].Add(line);
}

for (int i = 0; i < Polygons.Count; ++i) {
Polygon polygon = Polygons[i];
if (polygon.Type == PolygonType.Platform) {
Expand Down

0 comments on commit 3ae8406

Please sign in to comment.