don't output texinfo for SKIP faces - rendered faces won't reference them anyways (unless includeskip is on)
This commit is contained in:
parent
a7afc4fbb5
commit
d05b8fc3db
|
|
@ -64,6 +64,26 @@ static void PrintBSPTextureUsage(const mbsp_t &bsp)
|
|||
}
|
||||
}
|
||||
|
||||
static void FindInfiniteChains(const mbsp_t &bsp)
|
||||
{
|
||||
for (auto &ti : bsp.texinfo)
|
||||
{
|
||||
if (ti.nexttexinfo == -1)
|
||||
continue;
|
||||
|
||||
int loop = 0;
|
||||
|
||||
for (int i = ti.nexttexinfo; i != -1; i = bsp.texinfo[i].nexttexinfo, loop++)
|
||||
{
|
||||
if (loop > bsp.texinfo.size())
|
||||
{
|
||||
printf("INFINITE LOOP!");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
settings::common_settings options;
|
||||
|
||||
|
|
@ -95,6 +115,8 @@ int main(int argc, char **argv)
|
|||
|
||||
PrintBSPTextureUsage(std::get<mbsp_t>(bsp.bsp));
|
||||
|
||||
FindInfiniteChains(std::get<mbsp_t>(bsp.bsp));
|
||||
|
||||
printf("---------------------\n");
|
||||
|
||||
fs::clear();
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ size_t ExportMapTexinfo(size_t texinfonum)
|
|||
|
||||
if (src.outputnum.has_value())
|
||||
return src.outputnum.value();
|
||||
else if (!options.includeskip.value() && src.flags.is_skip)
|
||||
return -1;
|
||||
|
||||
// this will be the index of the exported texinfo in the BSP lump
|
||||
const size_t i = map.bsp.texinfo.size();
|
||||
|
|
|
|||
Loading…
Reference in New Issue