From af802d544747b7b5503a70680e59d3a86bd54be6 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 22 Jun 2022 22:23:14 -0600 Subject: [PATCH] qbsp: fix model bounds --- qbsp/solidbsp.cc | 4 ++-- qbsp/writebsp.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qbsp/solidbsp.cc b/qbsp/solidbsp.cc index d5276816..9837d581 100644 --- a/qbsp/solidbsp.cc +++ b/qbsp/solidbsp.cc @@ -930,7 +930,7 @@ tree_t *BrushBSP(mapentity_t *entity, bool midsplit) * smarter, but this works. */ node_t *headnode = new node_t{}; - headnode->bounds = entity->bounds.grow(SIDESPACE); + headnode->bounds = entity->bounds; headnode->children[0] = new node_t{}; headnode->children[0]->planenum = PLANENUM_LEAF; headnode->children[0]->contents = options.target_game->create_empty_contents(); @@ -968,7 +968,7 @@ tree_t *BrushBSP(mapentity_t *entity, bool midsplit) usemidsplit = midsplit; // calculate a bounding box for the entire model - headnode->bounds = entity->bounds.grow(SIDESPACE); + headnode->bounds = entity->bounds; // recursively partition everything splitnodes = 0; diff --git a/qbsp/writebsp.cc b/qbsp/writebsp.cc index add5c7e5..f1c72ebe 100644 --- a/qbsp/writebsp.cc +++ b/qbsp/writebsp.cc @@ -269,8 +269,8 @@ void ExportDrawNodes(mapentity_t *entity, node_t *headnode, int firstface) /* remove the headnode padding */ for (size_t i = 0; i < 3; i++) { - dmodel.mins[i] = headnode->bounds.mins()[i] + SIDESPACE + 1; - dmodel.maxs[i] = headnode->bounds.maxs()[i] - SIDESPACE - 1; + dmodel.mins[i] = headnode->bounds.mins()[i] + SIDESPACE; + dmodel.maxs[i] = headnode->bounds.maxs()[i] - SIDESPACE; } }