From 815e2c2cef813d72375d40f25293965f40579079 Mon Sep 17 00:00:00 2001 From: iknowsomething <5054918+iknowsomething@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:56:23 +0300 Subject: [PATCH] qbsp, maputil: fix empty brush format detection (was detected as brush_primitives) --- common/mapfile.cc | 2 +- qbsp/map.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/mapfile.cc b/common/mapfile.cc index d936e4b5..5add17df 100644 --- a/common/mapfile.cc +++ b/common/mapfile.cc @@ -1071,7 +1071,7 @@ void map_entity_t::parse_brush(parser_t &parser) brush_t brush; - if (parser.token == "(") { + if (parser.token == "(" || parser.token == "}") { brush.base_format = texcoord_style_t::quaked; } else { parser.parse_token(); diff --git a/qbsp/map.cc b/qbsp/map.cc index 3ecc7f9d..36a729c0 100644 --- a/qbsp/map.cc +++ b/qbsp/map.cc @@ -2507,7 +2507,7 @@ static mapbrush_t ParseBrush(parser_t &parser, mapentity_t &entity, texture_def_ if (!parser.parse_token(PARSE_PEEK)) FError("{}: unexpected EOF after {{ beginning brush", parser.location); - if (parser.token == "(") { + if (parser.token == "(" || parser.token == "}") { brush.format = brushformat_t::NORMAL; } else { parser.parse_token();