qbsp: add -outsidedebug flag
This commit is contained in:
parent
4caba85428
commit
8efb6f689b
|
|
@ -242,6 +242,6 @@ void ExportObj_Brushes(const std::string &filesuffix, const std::vector<const br
|
|||
void ExportObj_Nodes(const std::string &filesuffix, const node_t *nodes);
|
||||
void ExportObj_Marksurfaces(const std::string &filesuffix, const node_t *nodes);
|
||||
|
||||
void WriteBspBrushMap(const fs::path &name, const std::vector<const brush_t *> &list);
|
||||
void WriteBspBrushMap(const fs::path &name, const std::vector<brush_t> &list);
|
||||
|
||||
bool IsValidTextureProjection(const qvec3f &faceNormal, const qvec3f &s_vec, const qvec3f &t_vec);
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ public:
|
|||
setting_bool contenthack{this, "contenthack", false, &debugging_group,
|
||||
"hack to fix leaks through solids. causes missing faces in some cases so disabled by default"};
|
||||
setting_bool leaktest{this, "leaktest", false, &map_development_group, "make compilation fail if the map leaks"};
|
||||
setting_bool outsidedebug{this, "outsidedebug", false, &debugging_group, "write a .map after outside filling showing non-visible brush sides"};
|
||||
setting_bool keepprt{this, "keepprt", false, &debugging_group,
|
||||
"avoid deleting the .prt file on leaking maps"};
|
||||
setting_bool includeskip{this, "includeskip", false, &common_format_group,
|
||||
|
|
|
|||
|
|
@ -2295,7 +2295,11 @@ void WriteBspBrushMap(const fs::path &name, const std::vector<brush_t> &list)
|
|||
fmt::print(f, "( {} ) ", w[1]);
|
||||
fmt::print(f, "( {} ) ", w[2]);
|
||||
|
||||
fmt::print(f, "notexture 0 0 0 1 1\n");
|
||||
if (face.visible) {
|
||||
fmt::print(f, "skip 0 0 0 1 1\n");
|
||||
} else {
|
||||
fmt::print(f, "nonvisible 0 0 0 1 1\n");
|
||||
}
|
||||
}
|
||||
|
||||
fmt::print(f, "}}\n");
|
||||
|
|
|
|||
|
|
@ -543,6 +543,13 @@ bool FillOutside(mapentity_t *entity, node_t *node, const int hullnum)
|
|||
|
||||
MarkVisibleBrushSides_R(node);
|
||||
|
||||
if (options.outsidedebug.value() && hullnum == 0) {
|
||||
fs::path path = options.bsp_path;
|
||||
path.replace_extension(".outside.map");
|
||||
|
||||
WriteBspBrushMap(path, map.entities[0].brushes);
|
||||
}
|
||||
|
||||
logging::print(logging::flag::STAT, " {:8} outleafs\n", outleafs);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue