diff --git a/include/qbsp/map.hh b/include/qbsp/map.hh index 23721f4d..43e84f5f 100644 --- a/include/qbsp/map.hh +++ b/include/qbsp/map.hh @@ -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; diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 3eb35f2f..07542de5 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -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);