Merge branch 'brushbsp' of https://github.com/ericwa/ericw-tools into brushbsp

This commit is contained in:
Jonathan 2022-08-19 07:15:51 -04:00
commit 9596855c62
2 changed files with 14 additions and 21 deletions

View File

@ -1231,12 +1231,16 @@ std::unique_ptr<tree_t> BrushBSP(mapentity_t *entity, const bspbrush_t::containe
#endif
for (side_t &side : b->sides) {
// since we're reusing bspbrush_t's across passes, we need to clear any data from the previous pass
// behaviour break from qbsp3 - they would sometimes set `onnode` as a way to indicate "don't split on this side".
// we can't do this since we're reusing brushes, and need to add a separate flag for that.
side.onnode = false;
if (side.bevel)
continue;
if (!side.w)
continue;
if (side.onnode)
continue;
if (side.is_visible())
c_faces++;
else
@ -1268,12 +1272,5 @@ std::unique_ptr<tree_t> BrushBSP(mapentity_t *entity, const bspbrush_t::containe
logging::header("CountLeafs");
qbsp_options.target_game->print_content_stats(*stats.leafstats, "leafs");
// reset onnnode values
for (auto &b : brushlist) {
for (auto &s : b->sides) {
s.onnode = false;
}
}
return tree;
}

View File

@ -77,17 +77,7 @@
( 240 592 16 ) ( 240 640 16 ) ( 192 640 0 ) __TB_empty [ -1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 240 576 32 ) ( 240 640 32 ) ( 240 640 16 ) __TB_empty [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
// entity 1
{
"classname" "info_player_start"
"origin" "128 16 75"
"angle" "0"
}
// entity 2
{
"classname" "func_detail"
// brush 0
// brush 8
{
( 96 272 52 ) ( 128 320 160 ) ( 48 208 160 ) skip [ -0.5812381937190964 -0.8137334712067349 0 0 ] [ 0.014011936247737871 -0.010008525891241337 -0.9998517365350094 0 ] 0 1 1
( 96 272 52 ) ( 160 288 16 ) ( 128 320 160 ) skip [ -0.9191450300180579 -0.3939192985791677 0 0 ] [ 0.1103411073357252 -0.2574625837833588 -0.9599676338208091 0 ] 0 1 1
@ -95,7 +85,7 @@
( 64 64 16 ) ( 65 64 16 ) ( 64 65 16 ) skip [ -1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 128 320 160 ) ( 160 288 16 ) ( 48 208 160 ) bally [ 0 0 1.0000000000000002 -60.324303 ] [ 0 -1.0000000000000002 0 0 ] 0 1 1
}
// brush 1
// brush 9
{
( 96 336 52 ) ( 48 432 160 ) ( 128 320 160 ) skip [ 0.5812381937190965 -0.813733471206735 0 0 ] [ -0.12463786013791102 -0.08902704295565074 -0.9882001768077232 0 ] 0 1 1
( 128 320 160 ) ( 160 288 16 ) ( 96 336 52 ) skip [ 0.813733471206735 -0.5812381937190964 0 0 ] [ -0.02999002997227586 -0.04198604196118621 -0.9986679980767861 0 ] 0 1 1
@ -104,3 +94,9 @@
( 48 432 160 ) ( 160 288 16 ) ( 128 320 160 ) bally [ 0 0 1.0000000000000002 -60.324303 ] [ 0 -1.0000000000000002 0 0 ] 0 1 1
}
}
// entity 1
{
"classname" "info_player_start"
"origin" "128 16 75"
"angle" "0"
}