- moved the code in gl_data.cpp to better fitting places
* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals. * RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp. * the dumpgeometry CCMD has been moved to p_setup.cpp
This commit is contained in:
parent
0127a71974
commit
65e7b6dfaa
22 changed files with 249 additions and 390 deletions
|
|
@ -110,6 +110,7 @@
|
|||
#include "p_spec.h"
|
||||
#include "p_saveg.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "c_dispatch.h"
|
||||
#ifndef NO_EDATA
|
||||
#include "edata.h"
|
||||
#endif
|
||||
|
|
@ -4294,3 +4295,48 @@ CCMD (lineloc)
|
|||
}
|
||||
#endif
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// dumpgeometry
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
CCMD(dumpgeometry)
|
||||
{
|
||||
for (auto §or : level.sectors)
|
||||
{
|
||||
Printf(PRINT_LOG, "Sector %d\n", sector.sectornum);
|
||||
for (int j = 0; j<sector.subsectorcount; j++)
|
||||
{
|
||||
subsector_t * sub = sector.subsectors[j];
|
||||
|
||||
Printf(PRINT_LOG, " Subsector %d - real sector = %d - %s\n", int(sub->Index()), sub->sector->sectornum, sub->hacked & 1 ? "hacked" : "");
|
||||
for (uint32_t k = 0; k<sub->numlines; k++)
|
||||
{
|
||||
seg_t * seg = sub->firstline + k;
|
||||
if (seg->linedef)
|
||||
{
|
||||
Printf(PRINT_LOG, " (%4.4f, %4.4f), (%4.4f, %4.4f) - seg %d, linedef %d, side %d",
|
||||
seg->v1->fX(), seg->v1->fY(), seg->v2->fX(), seg->v2->fY(),
|
||||
seg->Index(), seg->linedef->Index(), seg->sidedef != seg->linedef->sidedef[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf(PRINT_LOG, " (%4.4f, %4.4f), (%4.4f, %4.4f) - seg %d, miniseg",
|
||||
seg->v1->fX(), seg->v1->fY(), seg->v2->fX(), seg->v2->fY(), seg->Index());
|
||||
}
|
||||
if (seg->PartnerSeg)
|
||||
{
|
||||
subsector_t * sub2 = seg->PartnerSeg->Subsector;
|
||||
Printf(PRINT_LOG, ", back sector = %d, real back sector = %d", sub2->render_sector->sectornum, seg->PartnerSeg->frontsector->sectornum);
|
||||
}
|
||||
else if (seg->backsector)
|
||||
{
|
||||
Printf(PRINT_LOG, ", back sector = %d (no partnerseg)", seg->backsector->sectornum);
|
||||
}
|
||||
|
||||
Printf(PRINT_LOG, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue