diff --git a/common/parser.cc b/common/parser.cc index 16312072..9bfd29b1 100644 --- a/common/parser.cc +++ b/common/parser.cc @@ -57,7 +57,7 @@ skipspace: } /* comment field */ - if (pos[0] == '/' && pos[1] == '/') { + if ((pos[0] == '/' && pos[1] == '/') || pos[0] == ';') { // quark writes ; comments in q2 maps if (flags & PARSE_COMMENT) { while (*pos && *pos != '\n') { *token_p++ = *pos++; diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 06486583..00f1f1fe 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -904,7 +904,7 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum) FreeTreePortals_r(tree->headnode); PruneNodes(tree->headnode); - if (hullnum <= 0 && entity == map.world_entity() && !map.leakfile) { + if (hullnum <= 0 && entity == map.world_entity() && (!map.leakfile || options.keepprt.value())) { WritePortalFile(tree); } diff --git a/qbsp/test_qbsp.cc b/qbsp/test_qbsp.cc index 92edbf67..6a9102dd 100644 --- a/qbsp/test_qbsp.cc +++ b/qbsp/test_qbsp.cc @@ -169,7 +169,7 @@ static std::tuple> LoadTestmap(c auto bsp_path = map_path; bsp_path.replace_extension(".bsp"); - std::vector args{"", "-nopercent", "-keepprt"}; + std::vector args{"", "-nopercent"}; for (auto &arg : extra_args) { args.push_back(arg); }