diff --git a/include/qbsp/qbsp.hh b/include/qbsp/qbsp.hh index 72bc7971..f93101b3 100644 --- a/include/qbsp/qbsp.hh +++ b/include/qbsp/qbsp.hh @@ -347,6 +347,8 @@ typedef struct options_s { vec_t on_epsilon; bool fObjExport; bool fOmitDetail; + bool fOmitDetailWall; + bool fOmitDetailIllusionary; bool fForcePRT1; } options_t; diff --git a/qbsp/brush.cc b/qbsp/brush.cc index f1889668..b0fbfa7c 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -1063,9 +1063,11 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum) continue; /* -omitdetail option */ - if (options.fOmitDetail && detail) + if (options.fOmitDetail && detail && !(cflags & CFLAGS_DETAIL_WALL)) continue; - if (options.fOmitDetail && detail_illusionary) + if (options.fOmitDetailWall && detail && (cflags & CFLAGS_DETAIL_WALL)) + continue; + if (options.fOmitDetailIllusionary && detail_illusionary) continue; /* turn solid brushes into detail, if we're in hull0 */ diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 8cff9eef..dcfa6b33 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -652,7 +652,9 @@ PrintOptions(void) " -epsilon [n] Customize ON_EPSILON (default 0.0001)\n" " -forceprt1 Create a PRT1 file for loading in editors, even if PRT2 is required to run vis.\n" " -objexport Export the map file as an .OBJ model after the CSG phase\n" - " -omitdetail Detail brushes are omitted from the compile\n" + " -omitdetail func_detail brushes are omitted from the compile\n" + " -omitdetailwall func_detail_wall brushes are omitted from the compile\n" + " -omitdetailillusionary func_detail_illusionary brushes are omitted from the compile\n" " -convert Convert a .MAP to a different .MAP format. fmt can be: quake, quake2, valve, bp (brush primitives).\n" " sourcefile .MAP file to process\n" " destfile .BSP file to output\n"); @@ -835,6 +837,10 @@ ParseOptions(char *szOptions) options.fObjExport = true; } else if (!Q_strcasecmp(szTok, "omitdetail")) { options.fOmitDetail = true; + } else if (!Q_strcasecmp(szTok, "omitdetailwall")) { + options.fOmitDetailWall = true; + } else if (!Q_strcasecmp(szTok, "omitdetailillusionary")) { + options.fOmitDetailIllusionary = true; } else if (!Q_strcasecmp(szTok, "convert")) { szTok2 = GetTok(szTok + strlen(szTok) + 1, szEnd); if (!szTok2)