From a94de7f8cca2420d59ccc986c411044f2c0f4c7c Mon Sep 17 00:00:00 2001 From: Jonathan Date: Mon, 6 Jun 2022 17:54:05 -0400 Subject: [PATCH] use closer to Q2 version of WindingIsTiny allow .outside.map to be written for Q2 as well --- qbsp/outside.cc | 2 +- qbsp/solidbsp.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qbsp/outside.cc b/qbsp/outside.cc index f14988d1..aad97cba 100644 --- a/qbsp/outside.cc +++ b/qbsp/outside.cc @@ -608,7 +608,7 @@ bool FillOutside(mapentity_t *entity, node_t *node, const int hullnum) MarkVisibleBrushSides_R(node); - if (options.outsidedebug.value() && hullnum == 0) { + if (options.outsidedebug.value() && (options.target_game->get_hull_sizes().size() == 0 || hullnum == 0)) { fs::path path = options.bsp_path; path.replace_extension(".outside.map"); diff --git a/qbsp/solidbsp.cc b/qbsp/solidbsp.cc index 9e0632da..8731735c 100644 --- a/qbsp/solidbsp.cc +++ b/qbsp/solidbsp.cc @@ -528,11 +528,12 @@ existance by the vertex snapping. #define EDGE_LENGTH 0.2 bool WindingIsTiny(const winding_t &w, double size) { + return w.area() < size; #if 0 if (WindingArea (w) < 1) return true; return false; -#else +#elif 0 int edges = 0; for (size_t i = 0; i < w.size(); i++) { size_t j = (i + 1) % w.size();