From b7a06f4bb31f447b416293d96085bde169d0cde2 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 5 Feb 2022 13:32:06 -0500 Subject: [PATCH] Don't automatically assign SOLID to brushes that have a valid trace type Fix mixed contents warning displaying the wrong contents --- common/bspfile.cc | 2 +- qbsp/brush.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/bspfile.cc b/common/bspfile.cc index 779d88f3..3a2bc496 100644 --- a/common/bspfile.cc +++ b/common/bspfile.cc @@ -628,7 +628,7 @@ struct gamedef_q2_t : public gamedef_t contentflags_t surf_contents = contents; // if we don't have a declared content type, assume solid. - if (!(surf_contents.native & ((Q2_LAST_VISIBLE_CONTENTS << 1) - 1))) { + if (!get_content_type(surf_contents)) { surf_contents.native |= Q2_CONTENTS_SOLID; } diff --git a/qbsp/brush.cc b/qbsp/brush.cc index 41c97703..e091c0b2 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -682,7 +682,7 @@ static contentflags_t Brush_GetContents(const mapbrush_t *mapbrush) if (!contents.types_equal(base_contents, options.target_game)) { LogPrint("mixed face contents ({} != {}) at line {}\n", - contentflags_t{mapface.contents}.to_string(options.target_game), + base_contents.to_string(options.target_game), contents.to_string(options.target_game), mapface.linenum); break; }