From 26b654779db5f34bafa61026d2c1bd981a8831df Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 18 May 2022 16:43:14 -0400 Subject: [PATCH 1/2] don't output the three Q2 params for non-Q2 maps being fed through decompile --- bsputil/decompile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsputil/decompile.cpp b/bsputil/decompile.cpp index e9745c84..0088913e 100644 --- a/bsputil/decompile.cpp +++ b/bsputil/decompile.cpp @@ -222,7 +222,7 @@ struct compiled_brush_t side.valve.shift[0], side.valve.axis.at(1, 0), side.valve.axis.at(1, 1), side.valve.axis.at(1, 2), side.valve.shift[1], 0.0, side.valve.scale[0], side.valve.scale[1]); - if (contents.native || side.flags.native || side.value) { + if (bsp->loadversion->game->id == GAME_QUAKE_II && (contents.native || side.flags.native || side.value)) { wal_metadata_t *meta = nullptr; auto it = wals.find(side.texture_name); From b63eb11275a73a43abee7237f602c64de05965ef Mon Sep 17 00:00:00 2001 From: Jonathan Date: Wed, 18 May 2022 17:50:05 -0400 Subject: [PATCH 2/2] wadpath/xwadpath always take 1 argument --- include/qbsp/qbsp.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/qbsp/qbsp.hh b/include/qbsp/qbsp.hh index a9b7d893..efd7014d 100644 --- a/include/qbsp/qbsp.hh +++ b/include/qbsp/qbsp.hh @@ -109,15 +109,15 @@ public: bool parse(const std::string &settingName, parser_base_t &parser, bool locked = false) override { - if (auto value = parseString(parser)) { - if (changeSource(locked ? source::COMMANDLINE : source::MAP)) { - _paths.insert(wadpath{fs::path(*value), settingName[0] == 'x'}); - } - - return true; + if (!parser.parse_token()) { + return false; } - return false; + if (changeSource(locked ? source::COMMANDLINE : source::MAP)) { + _paths.insert(wadpath{fs::path(parser.token), settingName[0] == 'x'}); + } + + return true; } std::string stringValue() const override