From 5dc3982a5444faffddf6e9b79bfce10cb14cca36 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 1 Oct 2021 22:50:49 -0600 Subject: [PATCH 1/4] testmaps: update qbspfeatures.map --- testmaps/qbspfeatures.map | 95 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 7 deletions(-) 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 +} +} From 3e56b635c0450174a6b357e6b6307f83a7137aca Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 1 Oct 2021 23:17:48 -0600 Subject: [PATCH 2/4] testmaps: update hashes --- testmaps/qbsp-vis.sha256sum | 2 +- testmaps/qbsp.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testmaps/qbsp-vis.sha256sum b/testmaps/qbsp-vis.sha256sum index 7e9b3bf4..8969d197 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 +a4e8cbef714d5c0343a2e46daac4b72b183a0e2f2e2a38700ce0a8658002947e *qbspfeatures.bsp diff --git a/testmaps/qbsp.sha256sum b/testmaps/qbsp.sha256sum index d50ae23f..99197ad2 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 +cd7f276b25403d3c9f8bd4dba2d75248582ea1b9bbd3763a518ce6b29ef50392 *qbspfeatures.bsp From ddf2a36d39fcd9589ae950645d611740b611987d Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 1 Oct 2021 23:18:27 -0600 Subject: [PATCH 3/4] qbsp: make func_detail_wall an alias for func_detail_fence --- include/qbsp/qbsp.hh | 1 - qbsp/brush.cc | 10 ++-------- qbsp/csg4.cc | 8 -------- qbsp/qbsp.cc | 8 ++------ 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/include/qbsp/qbsp.hh b/include/qbsp/qbsp.hh index 2e38b398..2eaf08d3 100644 --- a/include/qbsp/qbsp.hh +++ b/include/qbsp/qbsp.hh @@ -101,7 +101,6 @@ // Special contents flags for the compiler only #define CFLAGS_STRUCTURAL_COVERED_BY_DETAIL (1U << 0) #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 */ diff --git a/qbsp/brush.cc b/qbsp/brush.cc index 00349908..e5bfa769 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -1172,13 +1172,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; - cflags |= 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; } @@ -1233,9 +1229,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 && !(cflags & CFLAGS_DETAIL_WALL)) - continue; - if ((options.fOmitDetail || options.fOmitDetailWall) && detail && (cflags & 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 f110195a..68324a41 100644 --- a/qbsp/csg4.cc +++ b/qbsp/csg4.cc @@ -637,14 +637,6 @@ CSGFaces(const mapentity_t *entity) continue; } - if (clipbrush->contents == CONTENTS_DETAIL && (clipbrush->cflags & CFLAGS_DETAIL_WALL) - && !(brush->contents == CONTENTS_DETAIL && (brush->cflags & 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 == CONTENTS_DETAIL_FENCE && brush->contents != CONTENTS_DETAIL_FENCE) { /* CONTENTS_DETAIL_FENCE never clips anything but itself */ diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 812db5d6..75d478eb 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -126,22 +126,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); } From d4464a650342cba85535ee83b5f76ab89b71577f Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 1 Oct 2021 23:25:39 -0600 Subject: [PATCH 4/4] testmaps: update hash --- testmaps/qbsp-vis.sha256sum | 2 +- testmaps/qbsp.sha256sum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testmaps/qbsp-vis.sha256sum b/testmaps/qbsp-vis.sha256sum index 8969d197..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 -a4e8cbef714d5c0343a2e46daac4b72b183a0e2f2e2a38700ce0a8658002947e *qbspfeatures.bsp +a77527bae28e0b4840976efb06bec550261688af11a9a4b45cb97144a0aae52b *qbspfeatures.bsp diff --git a/testmaps/qbsp.sha256sum b/testmaps/qbsp.sha256sum index 99197ad2..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 -cd7f276b25403d3c9f8bd4dba2d75248582ea1b9bbd3763a518ce6b29ef50392 *qbspfeatures.bsp +eef438a0c8bf20cf05f7b91d8b0a36c4e968fe2820c692ea09300482ef83313a *qbspfeatures.bsp