light: MakeEdgeToFaceMap: handle invalid faces with repeating vertices

This commit is contained in:
Eric Wasylishen 2017-02-14 20:18:31 -07:00
parent 7895d13cf7
commit 05e144a5ca
1 changed files with 5 additions and 0 deletions

View File

@ -115,6 +115,11 @@ edgeToFaceMap_t MakeEdgeToFaceMap(const bsp2_t *bsp) {
const int v0 = Face_VertexAtIndex(bsp, f, j);
const int v1 = Face_VertexAtIndex(bsp, f, (j + 1) % f->numedges);
if (v0 == v1) {
// ad_swampy.bsp has faces with repeated verts...
continue;
}
const auto edge = make_pair(v0, v1);
auto &edgeFacesRef = result[edge];