qbsp: fix q2 brush export breaking when multiple tests run

This commit is contained in:
Eric Wasylishen 2022-05-14 15:13:47 -06:00
parent 863a3de04f
commit fa18a6755a
2 changed files with 3 additions and 4 deletions

View File

@ -146,6 +146,8 @@ struct mapdata_t
// Q2 stuff
int32_t numareaportals = 0;
// running total
uint32_t brush_offset = 0;
// misc
int start_spots = 0;

View File

@ -196,9 +196,6 @@ static struct
uint32_t total_leaf_brushes;
} brush_state;
// running total
static uint32_t brush_offset;
static void ExportBrushList_r(const mapentity_t *entity, node_t *node, const uint32_t &brush_offset)
{
if (node->planenum == PLANENUM_LEAF) {
@ -825,7 +822,7 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum)
firstface = MakeFaceEdges(entity, nodes);
if (options.target_game->id == GAME_QUAKE_II) {
ExportBrushList(entity, nodes, brush_offset);
ExportBrushList(entity, nodes, map.brush_offset);
}
ExportDrawNodes(entity, nodes, firstface);