qbsp: add -noextendedsurfflags flag to suppress .texinfo writing (for testing/debugging)
This commit is contained in:
parent
c9e41ab4db
commit
d9e16a943a
|
|
@ -209,6 +209,7 @@ public:
|
||||||
setting_bool forceprt1;
|
setting_bool forceprt1;
|
||||||
setting_tjunc tjunc;
|
setting_tjunc tjunc;
|
||||||
setting_bool objexport;
|
setting_bool objexport;
|
||||||
|
setting_bool noextendedsurfflags;
|
||||||
setting_bool wrbrushes;
|
setting_bool wrbrushes;
|
||||||
setting_redirect wrbrushesonly;
|
setting_redirect wrbrushesonly;
|
||||||
setting_bool bmodelcontents;
|
setting_bool bmodelcontents;
|
||||||
|
|
|
||||||
|
|
@ -532,6 +532,7 @@ qbsp_settings::qbsp_settings()
|
||||||
&debugging_group, "T-junction fix level"},
|
&debugging_group, "T-junction fix level"},
|
||||||
objexport{
|
objexport{
|
||||||
this, "objexport", false, &debugging_group, "export the map file as .OBJ models during various CSG phases"},
|
this, "objexport", false, &debugging_group, "export the map file as .OBJ models during various CSG phases"},
|
||||||
|
noextendedsurfflags{this, "noextendedsurfflags", false, &debugging_group, "suppress writing a .texinfo file"},
|
||||||
wrbrushes{this, {"wrbrushes", "bspx"}, false, &common_format_group,
|
wrbrushes{this, {"wrbrushes", "bspx"}, false, &common_format_group,
|
||||||
"includes a list of brushes for brush-based collision"},
|
"includes a list of brushes for brush-based collision"},
|
||||||
wrbrushesonly{this, {"wrbrushesonly", "bspxonly"}, {&wrbrushes, &noclip}, &common_format_group,
|
wrbrushesonly{this, {"wrbrushesonly", "bspxonly"}, {&wrbrushes, &noclip}, &common_format_group,
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,7 @@ static void WriteExtendedTexinfoFlags(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!needwrite)
|
if (!needwrite || qbsp_options.noextendedsurfflags.value())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// sort by output texinfo number
|
// sort by output texinfo number
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
// entity 1
|
// entity 1
|
||||||
{
|
{
|
||||||
"classname" "info_player_start"
|
"classname" "info_player_start"
|
||||||
"origin" "272 -104 24"
|
"origin" "272 -104 72"
|
||||||
"angle" "90"
|
"angle" "90"
|
||||||
}
|
}
|
||||||
// entity 2
|
// entity 2
|
||||||
|
|
@ -94,3 +94,31 @@
|
||||||
( 272 144 16 ) ( 272 144 17 ) ( 272 145 16 ) e1u1/twall2_1 -16 16 0 1 1
|
( 272 144 16 ) ( 272 144 17 ) ( 272 145 16 ) e1u1/twall2_1 -16 16 0 1 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// entity 4
|
||||||
|
{
|
||||||
|
"classname" "func_wall"
|
||||||
|
"_minlight" "1"
|
||||||
|
// brush 0
|
||||||
|
{
|
||||||
|
( 144 -160 0 ) ( 144 -159 0 ) ( 144 -160 1 ) e1u1/twall2_1 16 16 0 1 1
|
||||||
|
( 32 -160 0 ) ( 32 -160 1 ) ( 33 -160 0 ) e1u1/twall2_1 16 16 0 1 1
|
||||||
|
( 32 -160 0 ) ( 33 -160 0 ) ( 32 -159 0 ) e1u1/twall2_1 16 -64 0 1 1
|
||||||
|
( 272 -16 16 ) ( 272 -15 16 ) ( 273 -16 16 ) e1u1/twall2_1 16 -64 0 1 1
|
||||||
|
( 272 -16 16 ) ( 273 -16 16 ) ( 272 -16 17 ) e1u1/twall2_1 16 16 0 1 1
|
||||||
|
( 272 -16 16 ) ( 272 -16 17 ) ( 272 -15 16 ) e1u1/twall2_1 16 16 0 1 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// entity 5
|
||||||
|
{
|
||||||
|
"classname" "func_group"
|
||||||
|
"_minlight" "1"
|
||||||
|
// brush 0
|
||||||
|
{
|
||||||
|
( 288 -160 0 ) ( 288 -159 0 ) ( 288 -160 1 ) e1u1/twall2_1 16 16 0 1 1
|
||||||
|
( 176 -160 0 ) ( 176 -160 1 ) ( 177 -160 0 ) e1u1/twall2_1 0 16 0 1 1
|
||||||
|
( 176 -160 0 ) ( 177 -160 0 ) ( 176 -159 0 ) e1u1/twall2_1 0 -64 0 1 1
|
||||||
|
( 416 -16 16 ) ( 416 -15 16 ) ( 417 -16 16 ) e1u1/twall2_1 0 -64 0 1 1
|
||||||
|
( 416 -16 16 ) ( 417 -16 16 ) ( 416 -16 17 ) e1u1/twall2_1 0 16 0 1 1
|
||||||
|
( 416 -16 16 ) ( 416 -16 17 ) ( 416 -15 16 ) e1u1/twall2_1 16 16 0 1 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -687,6 +687,11 @@ TEST_CASE("q2_minlight_inherited")
|
||||||
{
|
{
|
||||||
auto [bsp, bspx] = QbspVisLight_Q2("q2_minlight_inherited.map", {});
|
auto [bsp, bspx] = QbspVisLight_Q2("q2_minlight_inherited.map", {});
|
||||||
|
|
||||||
|
{
|
||||||
|
INFO("check worldspawn minlight");
|
||||||
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[0], {64, 64, 64}, {456, 196, 0}, {0, 0, 1}, nullptr, &bspx);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
INFO("check that func_group inherits worldspawn minlight");
|
INFO("check that func_group inherits worldspawn minlight");
|
||||||
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[0], {64, 64, 64}, {360, 72, 16}, {0, 0, 1}, nullptr, &bspx);
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[0], {64, 64, 64}, {360, 72, 16}, {0, 0, 1}, nullptr, &bspx);
|
||||||
|
|
@ -695,4 +700,29 @@ TEST_CASE("q2_minlight_inherited")
|
||||||
INFO("check that func_wall inherits worldspawn minlight");
|
INFO("check that func_wall inherits worldspawn minlight");
|
||||||
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[1], {64, 64, 64}, {208, 72, 16}, {0, 0, 1}, nullptr, &bspx);
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[1], {64, 64, 64}, {208, 72, 16}, {0, 0, 1}, nullptr, &bspx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
INFO("check that func_group can override worldspawn minlight");
|
||||||
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[0], {128, 128, 128}, {360, -84, 16}, {0, 0, 1}, nullptr, &bspx);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
INFO("check that func_wall can override worldspawn minlight");
|
||||||
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[2], {128, 128, 128}, {208, -84, 16}, {0, 0, 1}, nullptr, &bspx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("q2_minlight_inherited + -noextendedsurfflags")
|
||||||
|
{
|
||||||
|
auto [bsp, bspx] =
|
||||||
|
QbspVisLight_Common("q2_minlight_inherited.map", {"-q2bsp", "-noextendedsurfflags"}, {}, runvis_t::no);
|
||||||
|
|
||||||
|
{
|
||||||
|
INFO("check that func_wall inherits worldspawn minlight");
|
||||||
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[1], {64, 64, 64}, {208, 72, 16}, {0, 0, 1}, nullptr, &bspx);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
INFO("check that func_wall can override worldspawn minlight");
|
||||||
|
CheckFaceLuxelAtPoint(&bsp, &bsp.dmodels[2], {128, 128, 128}, {208, -84, 16}, {0, 0, 1}, nullptr, &bspx);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue