diff --git a/common/bspfile.cc b/common/bspfile.cc index fa0eac55..6241f9f0 100644 --- a/common/bspfile.cc +++ b/common/bspfile.cc @@ -697,6 +697,10 @@ public: auto bits_a = contentflags_to_bits(a); auto bits_b = contentflags_to_bits(b); + // aviods spamming "sides not found" warning on Q1 maps with sky + if ((bits_a.solid || bits_a.sky) && (bits_b.solid || bits_b.sky)) + return create_empty_contents(); + q1_contentflags_bits result; if (bits_a.suppress_clipping_same_type || bits_b.suppress_clipping_same_type) { diff --git a/testmaps/qbsp_simple_worldspawn_sky.map b/testmaps/qbsp_simple_worldspawn_sky.map index 0daaf547..1c16e89a 100644 --- a/testmaps/qbsp_simple_worldspawn_sky.map +++ b/testmaps/qbsp_simple_worldspawn_sky.map @@ -67,3 +67,8 @@ "classname" "info_player_start" "origin" "-88 -64 120" } +// entity 2 +{ +"classname" "info_null" +"origin" "-40 -48 152" +} diff --git a/tests/test_qbsp.cc b/tests/test_qbsp.cc index da15815b..d46c00ff 100644 --- a/tests/test_qbsp.cc +++ b/tests/test_qbsp.cc @@ -727,6 +727,8 @@ TEST_CASE("simple_worldspawn_sky" * doctest::test_suite("testmaps_q1")) CHECK(prt->portals.size() == 0); // FIXME: unsure what the expected number of visclusters is, does sky get one? + + CHECK(12 == bsp.dclipnodes.size()); } TEST_CASE("water_detail_illusionary" * doctest::test_suite("testmaps_q1"))