diff --git a/include/common/bspfile.hh b/include/common/bspfile.hh index f368d32d..841165fa 100644 --- a/include/common/bspfile.hh +++ b/include/common/bspfile.hh @@ -266,7 +266,6 @@ typedef struct { // Special contents flags for the compiler only #define CFLAGS_STRUCTURAL_COVERED_BY_DETAIL (1 << 0) #define CFLAGS_WAS_ILLUSIONARY (1 << 1) /* was illusionary, got changed to something else */ -#define CFLAGS_DETAIL_WALL (1 << 2) /* don't clip world for func_detail_wall entities */ #define CFLAGS_BMODEL_MIRROR_INSIDE (1 << 3) /* set "_mirrorinside" "1" on a bmodel to mirror faces for when the player is inside. */ #define CFLAGS_NO_CLIPPING_SAME_TYPE (1 << 4) /* Don't clip the same content type. mostly intended for CONTENTS_DETAIL_ILLUSIONARY */ // only one of these flags below should ever be set. diff --git a/qbsp/brush.cc b/qbsp/brush.cc index 3f59afd5..1e41b4eb 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -1293,13 +1293,9 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum) if (!Q_strcasecmp(classname, "func_detail") && !options.fNodetail) { all_detail = true; } - if (!Q_strcasecmp(classname, "func_detail_wall") && !options.fNodetail) { - all_detail = true; - base_contents.extended |= CFLAGS_DETAIL_WALL; - } all_detail_fence = false; - if (!Q_strcasecmp(classname, "func_detail_fence") && !options.fNodetail) { + if ((!Q_strcasecmp(classname, "func_detail_fence") || !Q_strcasecmp(classname, "func_detail_wall")) && !options.fNodetail) { all_detail_fence = true; } @@ -1347,9 +1343,7 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum) continue; /* -omitdetail option omits all types of detail */ - if (options.fOmitDetail && detail && !contents.is_detail(CFLAGS_DETAIL_WALL)) - continue; - if ((options.fOmitDetail || options.fOmitDetailWall) && detail && contents.is_detail(CFLAGS_DETAIL_WALL)) + if (options.fOmitDetail && detail) continue; if ((options.fOmitDetail || options.fOmitDetailIllusionary) && detail_illusionary) continue; diff --git a/qbsp/csg4.cc b/qbsp/csg4.cc index 9255eb76..fb4efcf2 100644 --- a/qbsp/csg4.cc +++ b/qbsp/csg4.cc @@ -608,15 +608,7 @@ CSGFaces(const mapentity_t *entity) /* CONTENTS_DETAIL_ILLUSIONARY never clips anything but itself */ continue; } - - if (clipbrush->contents.is_detail(CFLAGS_DETAIL) && clipbrush->contents.is_detail(CFLAGS_DETAIL_WALL) - && !(brush->contents.is_detail(CFLAGS_DETAIL) && brush->contents.is_detail(CFLAGS_DETAIL_WALL))) { - /* if clipbrush has CONTENTS_DETAIL and CFLAGS_DETAIL_WALL are set, - only clip other brushes with both CONTENTS_DETAIL and CFLAGS_DETAIL_WALL. - */ - continue; - } - + if (clipbrush->contents.is_detail(CFLAGS_DETAIL_FENCE) && !brush->contents.is_detail(CFLAGS_DETAIL_FENCE)) { /* CONTENTS_DETAIL_FENCE never clips anything but itself */ diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 935e8041..5a0df4b1 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -292,22 +292,18 @@ ProcessEntity(mapentity_t *entity, const int hullnum) { int solidcount = Brush_ListCount(entity->solid); int skycount = Brush_ListCount(entity->sky); - int detail_all_count = Brush_ListCount(entity->detail); /* including CFLAGS_DETAIL_WALL */ - int detail_wall_count = Brush_ListCountWithCFlags(entity->detail, CFLAGS_DETAIL_WALL); + int detail_all_count = Brush_ListCount(entity->detail); int detail_illusionarycount = Brush_ListCount(entity->detail_illusionary); int detail_fence_count = Brush_ListCount(entity->detail_fence); int liquidcount = Brush_ListCount(entity->liquid); int nondetailcount = (solidcount + skycount + liquidcount); - int detailcount = detail_all_count - detail_wall_count; + int detailcount = detail_all_count; Message(msgStat, "%8d brushes", nondetailcount); if (detailcount > 0) { Message(msgStat, "%8d detail", detailcount); } - if (detail_wall_count > 0) { - Message(msgStat, "%8d detail wall", detail_wall_count); - } if (detail_fence_count > 0) { Message(msgStat, "%8d detail fence", detail_fence_count); } diff --git a/testmaps/qbsp-vis.sha256sum b/testmaps/qbsp-vis.sha256sum index 7e9b3bf4..a13b77c6 100644 --- a/testmaps/qbsp-vis.sha256sum +++ b/testmaps/qbsp-vis.sha256sum @@ -7,4 +7,4 @@ a5eb5b451baab8db48a141285479669656010fc7d3945e30672d609169b040e5 *e1m1-hexen2-2p ecf7a82cfad86c3b8a330645233c17011f77b8fef844130ac85dd6e8972eea8f *e1m1-hlbsp.bsp ce687f32a1059eb60bfb2b3868dc5fa8446a62aefc40f9cb459d0242b16b39ef *e1m1-bspxbrushes.bsp 0feeb8e76b2c3e0a9d8abf1233fc1450e85c6b54ade5a96dea9f965f0fbc2dde *e1m1-bsp29-onlyents.bsp -03e404a80f6a064acd676fa0013985f490ff91b63cfbc10adb00121f818bc08d *qbspfeatures.bsp +a77527bae28e0b4840976efb06bec550261688af11a9a4b45cb97144a0aae52b *qbspfeatures.bsp diff --git a/testmaps/qbsp.sha256sum b/testmaps/qbsp.sha256sum index d50ae23f..21e4e743 100644 --- a/testmaps/qbsp.sha256sum +++ b/testmaps/qbsp.sha256sum @@ -7,4 +7,4 @@ d289427e3c8a7046dce509a83401f6732a9c5f8194f8beb3eee431e33215656c *e1m1-bsp29.bsp 66936b95d27716cbcb28bc6bf8a0191f8d53bc7e2823abcb85cd04fec9d2fcb6 *e1m1-hlbsp.bsp 015c5fb3f350dfb10c031ed3ae44b3e094fbde38c48dec0897d0710fcbc7666c *e1m1-bspxbrushes.bsp af7bc468d76aa1b11d1881a3378877059c6fd33fb37bea555d332e17d0e1e23c *e1m1-bsp29-onlyents.bsp -c2a505cca04076ad0a1ae377558efc635997d0e5209a8711e3aeddb269aaef7d *qbspfeatures.bsp +eef438a0c8bf20cf05f7b91d8b0a36c4e968fe2820c692ea09300482ef83313a *qbspfeatures.bsp diff --git a/testmaps/qbspfeatures.map b/testmaps/qbspfeatures.map index 172bf8c7..bf269de8 100644 --- a/testmaps/qbspfeatures.map +++ b/testmaps/qbspfeatures.map @@ -389,12 +389,12 @@ "classname" "func_detail_wall" // brush 0 { -( -88 -256 48 ) ( -88 -255 48 ) ( -88 -256 49 ) {trigger [ -6.123233995736766e-17 -1 0 0 ] [ 0 0 -1 32 ] 0 1 1 -( -208 -272 16 ) ( -209 -272 16 ) ( -208 -272 17 ) {trigger [ 1 -6.123233995736766e-17 0 16 ] [ 0 0 -1 32 ] 0 1 1 -( -208 -384 16 ) ( -208 -383 16 ) ( -209 -384 16 ) {trigger [ -6.123233995736766e-17 -1 0 -64 ] [ 1 -6.123233995736766e-17 0 16 ] 90 1 1 -( -336 -256 104 ) ( -337 -256 104 ) ( -336 -255 104 ) {trigger [ 6.123233995736766e-17 1 0 0 ] [ 1 -6.123233995736766e-17 0 16 ] 270 1 1 -( -336 -256 48 ) ( -336 -256 49 ) ( -337 -256 48 ) {trigger [ -1 6.123233995736766e-17 0 -16 ] [ 0 0 -1 32 ] 0 1 1 -( 216 -384 16 ) ( 216 -384 17 ) ( 216 -383 16 ) {trigger [ 6.123233995736766e-17 1 0 0 ] [ 0 0 -1 32 ] 0 1 1 +( -88 -288 48 ) ( -88 -287 48 ) ( -88 -288 49 ) {trigger [ -6.123233995736766e-17 -1 0 -32 ] [ 0 0 -1 32 ] 0 1 1 +( -208 -304 16 ) ( -209 -304 16 ) ( -208 -304 17 ) {trigger [ 1 -6.123233995736766e-17 0 16 ] [ 0 0 -1 32 ] 0 1 1 +( -208 -416 16 ) ( -208 -415 16 ) ( -209 -416 16 ) {trigger [ -6.123233995736766e-17 -1 0 -32 ] [ 1 -6.123233995736766e-17 0 16 ] 90 1 1 +( -336 -288 104 ) ( -337 -288 104 ) ( -336 -287 104 ) {trigger [ 6.123233995736766e-17 1 0 32 ] [ 1 -6.123233995736766e-17 0 16 ] 270 1 1 +( -336 -288 48 ) ( -336 -288 49 ) ( -337 -288 48 ) {trigger [ -1 6.123233995736766e-17 0 -16 ] [ 0 0 -1 32 ] 0 1 1 +( 216 -416 16 ) ( 216 -416 17 ) ( 216 -415 16 ) {trigger [ 6.123233995736766e-17 1 0 32 ] [ 0 0 -1 32 ] 0 1 1 } } // entity 15 @@ -407,7 +407,7 @@ ( 0 -136 264 ) ( 1 -136 264 ) ( 0 -135 264 ) tsl_tower6 [ -1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 ( 64 -48 352 ) ( 64 -47 352 ) ( 65 -48 352 ) tsl_tower6 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1 ( 64 -40 272 ) ( 65 -40 272 ) ( 64 -40 273 ) tsl_tower6 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 -( 72 -48 272 ) ( 72 -48 273 ) ( 72 -47 272 ) tsl_tower6 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -48 272 ) ( 144 -48 273 ) ( 144 -47 272 ) tsl_tower6 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1 } } // entity 16 @@ -456,3 +456,84 @@ "classname" "light" "origin" "8 -376 224" } +// entity 22 +{ +"classname" "func_detail_fence" +// brush 0 +{ +( -88 16 48 ) ( -88 17 48 ) ( -88 16 49 ) {trigger [ -6.123233995736766e-17 -1 0 16 ] [ 0 0 -1 32 ] 0 1 1 +( -208 0 16 ) ( -209 0 16 ) ( -208 0 17 ) {trigger [ 1 -6.123233995736766e-17 0 -48 ] [ 0 0 -1 32 ] 0 1 1 +( -208 -112 16 ) ( -208 -111 16 ) ( -209 -112 16 ) {trigger [ -6.123233995736766e-17 -1 0 16 ] [ 1 -6.123233995736766e-17 0 -48 ] 90 1 1 +( -336 16 104 ) ( -337 16 104 ) ( -336 17 104 ) {trigger [ 6.123233995736766e-17 1 0 -16 ] [ 1 -6.123233995736766e-17 0 -48 ] 270 1 1 +( -336 16 48 ) ( -336 16 49 ) ( -337 16 48 ) {trigger [ -1 6.123233995736766e-17 0 48 ] [ 0 0 -1 32 ] 0 1 1 +( 216 -112 16 ) ( 216 -112 17 ) ( 216 -111 16 ) {trigger [ 6.123233995736766e-17 1 0 -16 ] [ 0 0 -1 32 ] 0 1 1 +} +} +// entity 23 +{ +"classname" "func_illusionary" +"_mirrorinside" "1" +// brush 0 +{ +( 80 -176 64 ) ( 80 -176 65 ) ( 80 -177 64 ) {trigger [ -1.2246467991473532e-16 -1 0 -32 ] [ 0 0 -1 -32 ] 0 1 1 +( 96 -192 264 ) ( 88 -192 264 ) ( 88 -192 392 ) skip [ 1 -1.2246467991473532e-16 0 -24 ] [ 0 0 -1 -32 ] 0 1 1 +( 104 -160 16 ) ( 103 -160 16 ) ( 104 -161 16 ) skip [ 1 -1.2246467991473532e-16 0 -24 ] [ 1.2246467991473532e-16 1 0 32 ] 180 1 1 +( 24 -176 264 ) ( 24 -177 264 ) ( 23 -176 264 ) skip [ -1 1.2246467991473532e-16 0 24 ] [ 1.2246467991473532e-16 1 0 32 ] 180 1 1 +( 104 -160 48 ) ( 104 -160 49 ) ( 103 -160 48 ) {trigger [ -1 1.2246467991473532e-16 0 24 ] [ 0 0 -1 -32 ] 0 1 1 +( 104 -160 48 ) ( 104 -161 48 ) ( 104 -160 49 ) {trigger [ 1.2246467991473532e-16 1 0 32 ] [ 0 0 -1 -32 ] 0 1 1 +} +// brush 1 +{ +( 80 -176 64 ) ( 80 -176 65 ) ( 80 -177 64 ) {trigger [ 0 0 1.0000000000000002 -16 ] [ 1.2246467991473535e-16 1.0000000000000002 0 32 ] 0 1 1 +( 96 -216 264 ) ( 88 -216 264 ) ( 88 -216 392 ) skip [ 1 -1.2246467991473532e-16 0 -24 ] [ 0 0 -1 -32 ] 0 1 1 +( 104 -160 16 ) ( 103 -160 16 ) ( 104 -161 16 ) skip [ -1 1.2246467991473532e-16 0 8 ] [ 1.2246467991473532e-16 1 0 32 ] 180 1 1 +( 24 -176 264 ) ( 24 -177 264 ) ( 23 -176 264 ) skip [ -1 1.2246467991473532e-16 0 8 ] [ 1.2246467991473532e-16 1 0 32 ] 180 1 1 +( 96 -192 264 ) ( 88 -192 392 ) ( 88 -192 264 ) skip [ -1 1.2246467991473532e-16 0 24 ] [ 0 0 -1 -32 ] 0 1 1 +( 104 -160 48 ) ( 104 -161 48 ) ( 104 -160 49 ) skip [ 1.2246467991473532e-16 1 0 32 ] [ 0 0 -1 -32 ] 0 1 1 +} +// brush 2 +{ +( 80 -176 64 ) ( 80 -176 65 ) ( 80 -177 64 ) {trigger [ -1.2246467991473532e-16 -1 0 -32 ] [ 0 0 -1 -32 ] 0 1 1 +( 24 -248 64 ) ( 23 -248 64 ) ( 24 -248 65 ) {trigger [ 1 -1.2246467991473532e-16 0 -24 ] [ 0 0 -1 -32 ] 0 1 1 +( 104 -160 16 ) ( 103 -160 16 ) ( 104 -161 16 ) skip [ 1 -1.2246467991473532e-16 0 -24 ] [ 1.2246467991473532e-16 1 0 32 ] 180 1 1 +( 24 -176 264 ) ( 24 -177 264 ) ( 23 -176 264 ) skip [ -1 1.2246467991473532e-16 0 24 ] [ 1.2246467991473532e-16 1 0 32 ] 180 1 1 +( 96 -216 264 ) ( 88 -216 392 ) ( 88 -216 264 ) skip [ 1.0000000000000002 -1.2246467991473535e-16 0 -48 ] [ 0 0 -1.0000000000000002 -32 ] 0 1 1 +( 104 -160 48 ) ( 104 -161 48 ) ( 104 -160 49 ) {trigger [ 1.2246467991473532e-16 1 0 32 ] [ 0 0 -1 -32 ] 0 1 1 +} +// brush 3 +{ +( 104 -168 64 ) ( 104 -168 65 ) ( 104 -169 64 ) skip [ -1.2246467991473532e-16 -1 0 -32 ] [ 0 0 -1 -32 ] 0 1 1 +( 48 -216 64 ) ( 47 -216 64 ) ( 48 -216 65 ) {trigger [ 1 -1.2246467991473532e-16 0 -48 ] [ 0 0 -1 -32 ] 0 1 1 +( 128 -152 16 ) ( 127 -152 16 ) ( 128 -153 16 ) skip [ 1 -1.2246467991473532e-16 0 -48 ] [ 1.2246467991473532e-16 1 0 24 ] 180 1 1 +( 48 -168 264 ) ( 48 -169 264 ) ( 47 -168 264 ) skip [ -1 1.2246467991473532e-16 0 48 ] [ 1.2246467991473532e-16 1 0 24 ] 180 1 1 +( 128 -192 48 ) ( 128 -192 49 ) ( 127 -192 48 ) {trigger [ -1 1.2246467991473532e-16 0 48 ] [ 0 0 -1 -32 ] 0 1 1 +( 128 -152 48 ) ( 128 -153 48 ) ( 128 -152 49 ) {trigger [ 1.2246467991473532e-16 1 0 24 ] [ 0 0 -1 -32 ] 0 1 1 +} +} +// entity 24 +{ +"classname" "func_detail" +// brush 0 +{ +( 64 -248 264 ) ( 64 -247 264 ) ( 64 -248 265 ) tsl_tower6 [ 0 -1 0 16 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -256 264 ) ( 0 -256 265 ) ( 1 -256 264 ) tsl_tower6 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 0 -248 264 ) ( 1 -248 264 ) ( 0 -247 264 ) tsl_tower6 [ -1 0 0 0 ] [ 0 -1 0 16 ] 0 1 1 +( 64 -160 352 ) ( 64 -159 352 ) ( 65 -160 352 ) tsl_tower6 [ 1 0 0 0 ] [ 0 -1 0 16 ] 0 1 1 +( 64 -152 272 ) ( 65 -152 272 ) ( 64 -152 273 ) tsl_tower6 [ -1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1 +( 144 -160 272 ) ( 144 -160 273 ) ( 144 -159 272 ) tsl_tower6 [ 0 1 0 -16 ] [ 0 0 -1 0 ] 0 1 1 +} +} +// entity 25 +{ +"classname" "func_detail_fence" +"_mirrorinside" "1" +// brush 0 +{ +( -88 64 48 ) ( -88 65 48 ) ( -88 64 49 ) {trigger [ -6.123233995736766e-17 -1 0 0 ] [ 0 0 -1 32 ] 0 1 1 +( -208 48 16 ) ( -209 48 16 ) ( -208 48 17 ) {trigger [ 1 -6.123233995736766e-17 0 -48 ] [ 0 0 -1 32 ] 0 1 1 +( -208 -64 16 ) ( -208 -63 16 ) ( -209 -64 16 ) {trigger [ -6.123233995736766e-17 -1 0 0 ] [ 1 -6.123233995736766e-17 0 -48 ] 90 1 1 +( -336 64 104 ) ( -337 64 104 ) ( -336 65 104 ) {trigger [ 6.123233995736766e-17 1 0 0 ] [ 1 -6.123233995736766e-17 0 -48 ] 270 1 1 +( -336 64 48 ) ( -336 64 49 ) ( -337 64 48 ) {trigger [ -1 6.123233995736766e-17 0 48 ] [ 0 0 -1 32 ] 0 1 1 +( 216 -64 16 ) ( 216 -64 17 ) ( 216 -63 16 ) {trigger [ 6.123233995736766e-17 1 0 0 ] [ 0 0 -1 32 ] 0 1 1 +} +}