testqbsp: clean up clearing of data between tests
This commit is contained in:
parent
a950d2fcb7
commit
9ff0752ad1
|
|
@ -1215,9 +1215,6 @@ void InitQBSP(int argc, const char **argv)
|
||||||
// In case we're launched more than once, in testqbsp
|
// In case we're launched more than once, in testqbsp
|
||||||
map.reset();
|
map.reset();
|
||||||
qbsp_options.reset();
|
qbsp_options.reset();
|
||||||
// fixme-brushbsp: clear any other members of qbsp_settings
|
|
||||||
qbsp_options.target_game = nullptr;
|
|
||||||
qbsp_options.target_version = nullptr;
|
|
||||||
|
|
||||||
qbsp_options.run(argc, argv);
|
qbsp_options.run(argc, argv);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,11 +39,12 @@ const mapface_t *Mapbrush_FirstFaceWithTextureName(const mapbrush_t &brush, cons
|
||||||
|
|
||||||
mapentity_t &LoadMap(const char *map)
|
mapentity_t &LoadMap(const char *map)
|
||||||
{
|
{
|
||||||
|
::map.reset();
|
||||||
|
qbsp_options.reset();
|
||||||
|
|
||||||
qbsp_options.target_version = &bspver_q1;
|
qbsp_options.target_version = &bspver_q1;
|
||||||
qbsp_options.target_game = qbsp_options.target_version->game;
|
qbsp_options.target_game = qbsp_options.target_version->game;
|
||||||
|
|
||||||
::map.entities.clear();
|
|
||||||
|
|
||||||
parser_t parser(map, { doctest::getContextOptions()->currentTest->m_name });
|
parser_t parser(map, { doctest::getContextOptions()->currentTest->m_name });
|
||||||
|
|
||||||
mapentity_t &entity = ::map.entities.emplace_back();
|
mapentity_t &entity = ::map.entities.emplace_back();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue