From 014e0d8aaa41a672ffdc3cf3668b00df7e290202 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 10 Jun 2022 00:07:01 -0600 Subject: [PATCH] qbsp: replace some contents.extended reads with new is_detail_*() getters --- qbsp/solidbsp.cc | 6 +++--- qbsp/writebsp.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qbsp/solidbsp.cc b/qbsp/solidbsp.cc index 2dc4e017..6b4cd29d 100644 --- a/qbsp/solidbsp.cc +++ b/qbsp/solidbsp.cc @@ -858,11 +858,11 @@ static void CreateLeaf(std::vector> brushes, node_t *le if (leafnode->contents.extended & CFLAGS_ILLUSIONARY_VISBLOCKER) { c_illusionary_visblocker++; - } else if (leafnode->contents.extended & CFLAGS_DETAIL_FENCE) { + } else if (leafnode->contents.is_detail_fence(options.target_game)) { c_detail_fence++; - } else if (leafnode->contents.extended & CFLAGS_DETAIL_ILLUSIONARY) { + } else if (leafnode->contents.is_detail_illusionary(options.target_game)) { c_detail_illusionary++; - } else if (leafnode->contents.extended & CFLAGS_DETAIL) { + } else if (leafnode->contents.is_detail_solid(options.target_game)) { c_detail++; } else if (leafnode->contents.is_empty(options.target_game)) { c_empty++; diff --git a/qbsp/writebsp.cc b/qbsp/writebsp.cc index 05eac3d4..b777ed12 100644 --- a/qbsp/writebsp.cc +++ b/qbsp/writebsp.cc @@ -34,7 +34,7 @@ using nlohmann::json; static contentflags_t RemapContentsForExport(const contentflags_t &content) { - if (content.extended & CFLAGS_DETAIL_FENCE) { + if (content.is_detail_fence(options.target_game)) { /* * A bit of a hack for Q2, to ensure that structural faces which are completely covered by CFLAGS_DETAIL_FENCE * still render.