From 41a43753767bcec72e4968c018bf7390411bba3c Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 12 Mar 2023 23:39:25 -0600 Subject: [PATCH] qbsp: q2: reject DEADMONSTER and MONSTER in input brushes we currently (hackily) use MONSTER as detail_wall internally (this will likely change later though.) In any case these are invalid in input maps. --- qbsp/map.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qbsp/map.cc b/qbsp/map.cc index 0bc2126f..800fe766 100644 --- a/qbsp/map.cc +++ b/qbsp/map.cc @@ -1731,6 +1731,12 @@ static void ParseTextureDef(const mapentity_t &entity, parser_t &parser, mapface } } + // Other Q2 hard errors + if (extinfo.info->contents.native & (Q2_CONTENTS_MONSTER | Q2_CONTENTS_DEADMONSTER)) { + FError( + "{}: Illegal contents: {}", mapface.line, extinfo.info->contents.to_string(qbsp_options.target_game)); + } + // If Q2 style phong is enabled on a mirrored face, `light` will erroneously try to blend normals between // the front and back faces leading to light artifacts. const bool wants_phong = !(extinfo.info->flags.native & Q2_SURF_LIGHT) && (extinfo.info->value != 0);