Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp

This commit is contained in:
Jonathan 2022-06-22 14:43:57 -04:00
commit 0fa779afaa
3 changed files with 3 additions and 3 deletions

View File

@ -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++;

View File

@ -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);
}

View File

@ -169,7 +169,7 @@ static std::tuple<mbsp_t, bspxentries_t, std::optional<prtfile_t>> LoadTestmap(c
auto bsp_path = map_path;
bsp_path.replace_extension(".bsp");
std::vector<std::string> args{"", "-nopercent", "-keepprt"};
std::vector<std::string> args{"", "-nopercent"};
for (auto &arg : extra_args) {
args.push_back(arg);
}