From 7275155d624efb45a99ff0f6b7bb0e82a0bc1b89 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 4 May 2022 20:53:41 -0600 Subject: [PATCH] qbsp: remove obsolete/wrong comment --- qbsp/brush.cc | 10 ---------- qbsp/test_qbsp.cc | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/qbsp/brush.cc b/qbsp/brush.cc index bbb94bb2..e020a4ab 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -745,16 +745,6 @@ static void Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int int lmshift; bool all_detail, all_detail_fence, all_detail_illusionary; - /* - * The brush list needs to be ordered (lowest to highest priority): - * - detail_illusionary (which is saved as empty) - * - liquid - * - detail_fence - * - detail (which is solid) - * - sky - * - solid - */ - classname = ValueForKey(src, "classname"); /* Origin brush support */ diff --git a/qbsp/test_qbsp.cc b/qbsp/test_qbsp.cc index df7e2817..ed4d1755 100644 --- a/qbsp/test_qbsp.cc +++ b/qbsp/test_qbsp.cc @@ -896,6 +896,14 @@ TEST(testmaps_q2, areaportal) // the areaportal leaf itself actually gets assigned to one of the two sides' areas EXPECT_THAT(areaportal_leaf->area, AnyOf(1, 2)); EXPECT_THAT(0, void_leaf->area); // a solid leaf gets the invalid area + + // check the func_areaportal entity had its "style" set + auto ents = EntData_Parse(bsp.dentdata); + auto it = std::find_if(ents.begin(), ents.end(), + [](const entdict_t &dict) { return dict.get("classname") == "func_areaportal"; }); + + ASSERT_NE(it, ents.end()); + ASSERT_EQ("1", it->get("style")); } TEST(testmaps_q2, base1)