testqbsp: write out .bsp.json files for testmaps
This commit is contained in:
parent
ba37ae3a54
commit
863a3de04f
|
|
@ -47,6 +47,8 @@ static mapentity_t LoadMap(const char *map)
|
|||
return worldspawn;
|
||||
}
|
||||
|
||||
#include <common/bspinfo.hh>
|
||||
|
||||
static mbsp_t LoadTestmap(const std::filesystem::path &name, std::vector<std::string> extra_args = {})
|
||||
{
|
||||
auto map_path = std::filesystem::path(testmaps_dir) / name;
|
||||
|
|
@ -91,6 +93,9 @@ static mbsp_t LoadTestmap(const std::filesystem::path &name, std::vector<std::st
|
|||
|
||||
ConvertBSPFormat(&bspdata, &bspver_generic);
|
||||
|
||||
// write to .json for inspection
|
||||
serialize_bsp(bspdata, std::get<mbsp_t>(bspdata.bsp), fs::path(options.bsp_path).replace_extension(".bsp.json"));
|
||||
|
||||
return std::get<mbsp_t>(bspdata.bsp);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue