qbsp: add -leaktest option (from q2)
This commit is contained in:
parent
5d204036b7
commit
1a15d5f0e9
|
|
@ -359,6 +359,7 @@ public:
|
||||||
bool fOmitDetailFence;
|
bool fOmitDetailFence;
|
||||||
bool fForcePRT1;
|
bool fForcePRT1;
|
||||||
bool fTestExpand;
|
bool fTestExpand;
|
||||||
|
bool fLeakTest;
|
||||||
|
|
||||||
options_t() {
|
options_t() {
|
||||||
memset(this, 0, sizeof(options_t));
|
memset(this, 0, sizeof(options_t));
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,12 @@ FillOutside(node_t *node, const int hullnum)
|
||||||
StripExtension(options.szBSPName);
|
StripExtension(options.szBSPName);
|
||||||
strcat(options.szBSPName, ".prt");
|
strcat(options.szBSPName, ".prt");
|
||||||
remove(options.szBSPName);
|
remove(options.szBSPName);
|
||||||
|
|
||||||
|
if (options.fLeakTest) {
|
||||||
|
logprint("Aborting because -leaktest was used.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -687,6 +687,7 @@ PrintOptions(void)
|
||||||
" -omitdetailfence func_detail_fence brushes are omitted from the compile\n"
|
" -omitdetailfence func_detail_fence brushes are omitted from the compile\n"
|
||||||
" -convert <fmt> Convert a .MAP to a different .MAP format. fmt can be: quake, quake2, valve, bp (brush primitives).\n"
|
" -convert <fmt> Convert a .MAP to a different .MAP format. fmt can be: quake, quake2, valve, bp (brush primitives).\n"
|
||||||
" -expand Write hull 1 expanded brushes to expanded.map for debugging\n"
|
" -expand Write hull 1 expanded brushes to expanded.map for debugging\n"
|
||||||
|
" -leaktest Make compilation fail if the map leaks\n"
|
||||||
" sourcefile .MAP file to process\n"
|
" sourcefile .MAP file to process\n"
|
||||||
" destfile .BSP file to output\n");
|
" destfile .BSP file to output\n");
|
||||||
|
|
||||||
|
|
@ -887,6 +888,8 @@ ParseOptions(char *szOptions)
|
||||||
logprint(" Only use this for viewing portals in a map editor.\n");
|
logprint(" Only use this for viewing portals in a map editor.\n");
|
||||||
} else if (!Q_strcasecmp(szTok, "expand")) {
|
} else if (!Q_strcasecmp(szTok, "expand")) {
|
||||||
options.fTestExpand = true;
|
options.fTestExpand = true;
|
||||||
|
} else if (!Q_strcasecmp(szTok, "leaktest")) {
|
||||||
|
options.fLeakTest = true;
|
||||||
} else if (!Q_strcasecmp(szTok, "?") || !Q_strcasecmp(szTok, "help"))
|
} else if (!Q_strcasecmp(szTok, "?") || !Q_strcasecmp(szTok, "help"))
|
||||||
PrintOptions();
|
PrintOptions();
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue