From 968a840e47d64989f35e284e0bb9e4ff3b49d198 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 29 Aug 2021 20:43:55 -0600 Subject: [PATCH] light: make a certain degenerate face non-fatal seen compiling ad_sepulcher.map with qbism q2 tools --- light/phong.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/light/phong.cc b/light/phong.cc index e996e07b..72b56e7d 100644 --- a/light/phong.cc +++ b/light/phong.cc @@ -370,7 +370,10 @@ static edgeToFaceMap_t MakeEdgeToFaceMap(const mbsp_t *bsp) const auto edge = make_pair(v0, v1); auto &edgeFacesRef = result[edge]; - Q_assert(find(begin(edgeFacesRef), end(edgeFacesRef), f) == end(edgeFacesRef)); + if (find(begin(edgeFacesRef), end(edgeFacesRef), f) != end(edgeFacesRef)) { + // another sort of degenerate face where the same edge A->B appears more than once on the face + continue; + } edgeFacesRef.push_back(f); } }