qbsp: experimental _noclipfaces key

This commit is contained in:
Eric Wasylishen 2018-03-13 12:23:41 -06:00
parent c9b32214c1
commit f92b48a8cb
3 changed files with 12 additions and 0 deletions

View File

@ -117,6 +117,7 @@
#define CFLAGS_WAS_ILLUSIONARY (1U << 1) /* was illusionary, got changed to something else */
#define CFLAGS_DETAIL_WALL (1U << 2) /* don't clip world for func_detail_wall entities */
#define CFLAGS_BMODEL_MIRROR_INSIDE (1U << 3) /* set "_mirrorinside" "1" on a bmodel to mirror faces for when the player is inside. */
#define CFLAGS_NO_CLIPPING_SAME_TYPE (1U << 4) /* Don't clip the same content type. mostly intended for CONTENTS_DETAIL_ILLUSIONARY */
// Texture flags. Only TEX_SPECIAL is written to the .bsp.
// Extended flags are written to a .texinfo file and read by the light tool

View File

@ -1123,6 +1123,11 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum)
cflags |= CFLAGS_BMODEL_MIRROR_INSIDE;
}
/* _noclipfaces */
if (atoi(ValueForKey(src, "_noclipfaces"))) {
cflags |= CFLAGS_NO_CLIPPING_SAME_TYPE;
}
const bool func_illusionary_visblocker =
(0 == Q_strcasecmp(classname, "func_illusionary_visblocker"));

View File

@ -625,6 +625,12 @@ CSGFaces(const mapentity_t *entity)
continue;
}
if (clipbrush->contents == brush->contents
&& (clipbrush->cflags & CFLAGS_NO_CLIPPING_SAME_TYPE)) {
/* _noclipfaces key */
continue;
}
/* check bounding box first */
for (i = 0; i < 3; i++) {
if (brush->mins[i] > clipbrush->maxs[i])