qbsp: add -omitdetail option

This commit is contained in:
Eric Wasylishen 2017-02-27 13:26:01 -07:00
parent d513f43540
commit a6f56d9111
4 changed files with 11 additions and 0 deletions

View File

@ -80,6 +80,8 @@ Generate a hexen2 bsp.
"-wrbrushes" combined with "-noclip" argument. "-wrbrushes" combined with "-noclip" argument.
.IP "\fB\-notex\fP" .IP "\fB\-notex\fP"
Write only placeholder textures, to depend upon replacements. Write only placeholder textures, to depend upon replacements.
.IP "\fB\-omitdetail\fP"
Detail brushes are omitted from the compile.
.SH "SPECIAL TEXTURE NAMES" .SH "SPECIAL TEXTURE NAMES"
.PP .PP

View File

@ -992,6 +992,11 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum)
if (contents == CONTENTS_ORIGIN) if (contents == CONTENTS_ORIGIN)
continue; continue;
/* -omitdetail option */
if (options.fOmitDetail
&& ((cflags & CFLAGS_DETAIL) == CFLAGS_DETAIL))
continue;
/* /*
* "clip" brushes don't show up in the draw hull, but we still want to * "clip" brushes don't show up in the draw hull, but we still want to
* include them in the model bounds so collision detection works * include them in the model bounds so collision detection works

View File

@ -629,6 +629,7 @@ PrintOptions(void)
" -maxnodesize [n]Triggers simpler BSP Splitting when node exceeds size (default 1024, 0 to disable)\n" " -maxnodesize [n]Triggers simpler BSP Splitting when node exceeds size (default 1024, 0 to disable)\n"
" -epsilon [n] Customize ON_EPSILON (default 0.0001)\n" " -epsilon [n] Customize ON_EPSILON (default 0.0001)\n"
" -objexport Export the map file as an .OBJ model after the CSG phase\n" " -objexport Export the map file as an .OBJ model after the CSG phase\n"
" -omitdetail Detail brushes are omitted from the compile\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");
@ -806,6 +807,8 @@ ParseOptions(char *szOptions)
szTok = szTok2; szTok = szTok2;
} else if (!Q_strcasecmp(szTok, "objexport")) { } else if (!Q_strcasecmp(szTok, "objexport")) {
options.fObjExport = true; options.fObjExport = true;
} else if (!Q_strcasecmp(szTok, "omitdetail")) {
options.fOmitDetail = true;
} else if (!Q_strcasecmp(szTok, "?") || !Q_strcasecmp(szTok, "help")) } else if (!Q_strcasecmp(szTok, "?") || !Q_strcasecmp(szTok, "help"))
PrintOptions(); PrintOptions();
else else

View File

@ -505,6 +505,7 @@ typedef struct options_s {
char wadPath[512]; char wadPath[512];
vec_t on_epsilon; vec_t on_epsilon;
bool fObjExport; bool fObjExport;
bool fOmitDetail;
} options_t; } options_t;
extern options_t options; extern options_t options;