From 02e66edd5b7afe3a0ca30c6957c515f0b8b52096 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Thu, 5 Apr 2018 22:18:28 -0600 Subject: [PATCH] qbsp: make "too many edges" have a clear error message, instead of an assertion failure --- qbsp/surfaces.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qbsp/surfaces.cc b/qbsp/surfaces.cc index d346b717..813f90f7 100644 --- a/qbsp/surfaces.cc +++ b/qbsp/surfaces.cc @@ -313,7 +313,9 @@ GetEdge(mapentity_t *entity, const vec3_t p1, const vec3_t p2, if (it != hashedges.end()) { for (const int i : it->second) { edge = (bsp29_dedge_t *)edges->data + i; - Q_assert(v1 == edge->v[1] && v2 == edge->v[0]); + if (!(v1 == edge->v[1] && v2 == edge->v[0])) { + Error("Too many edges for standard BSP format. Try compiling with -bsp2"); + } if (pEdgeFaces1[i] == NULL && pEdgeFaces0[i]->contents[0] == face->contents[0]) { pEdgeFaces1[i] = face;