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

This commit is contained in:
Jonathan 2022-08-14 07:33:49 -04:00
commit 2fe8ef2182
5 changed files with 32 additions and 1 deletions

View File

@ -713,7 +713,7 @@ public:
// copy assignment
setting_container &operator=(const setting_container &other) = delete;
void reset();
virtual void reset();
void copyFrom(const setting_container &other);

View File

@ -362,6 +362,7 @@ public:
}
void initialize(int argc, const char **argv) override;
void postinitialize(int argc, const char **argv) override;
void reset() override;
bool fVerbose = true;
bool fAllverbose = false;

View File

@ -289,6 +289,20 @@ void qbsp_settings::postinitialize(int argc, const char **argv)
common_settings::postinitialize(argc, argv);
}
void qbsp_settings::reset() {
common_settings::reset();
fVerbose = false;
fAllverbose = false;
fNoverbose = false;
target_version = nullptr;
target_game = nullptr;
map_path = fs::path();
bsp_path = fs::path();
loaded_texture_defs.clear();
loaded_entity_defs.clear();
}
}; // namespace settings
settings::qbsp_settings qbsp_options;

View File

@ -80,3 +80,8 @@
( 48 -32 112 ) ( 48 -32 113 ) ( 48 -31 112 ) +0fan [ 0 1 0 16 ] [ 0 0 -1 0 ] 0 1 1
}
}
// entity 3
{
"classname" "light"
"origin" "-24 -48 152"
}

View File

@ -652,6 +652,13 @@ TEST_CASE("simple_worldspawn_detail", "[testmaps_q1]")
// 5 faces for the "button"
// 9 faces for the room
REQUIRE(bsp.dfaces.size() == 14);
// 6 for the box room
// 5 for the "button"
CHECK(bsp.dnodes.size() == 11);
// this is how many we get with ericw-tools-v0.18.1-32-g6660c5f-win64
CHECK(bsp.dclipnodes.size() <= 22);
}
TEST_CASE("simple_worldspawn_detail_illusionary", "[testmaps_q1]")
@ -1105,6 +1112,10 @@ TEST_CASE("q1_cube", "[testmaps_q1]")
// model bounds are shrunk by 1 unit on each side for some reason
CHECK(cube_bounds.grow(-1).mins() == bsp.dmodels[0].mins);
CHECK(cube_bounds.grow(-1).maxs() == bsp.dmodels[0].maxs);
CHECK(6 == bsp.dnodes.size());
CHECK(12 == bsp.dclipnodes.size());
}
/**