- moved some diagnostic CCMDs to g_dumpinfo.cpp.
This commit is contained in:
parent
5010e61309
commit
18fb7fdd81
8 changed files with 77 additions and 87 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "d_net.h"
|
||||
#include "p_setup.h"
|
||||
#include "w_wad.h"
|
||||
#include "v_text.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
@ -250,3 +251,59 @@ CCMD(dumptags)
|
|||
|
||||
|
||||
|
||||
CCMD(dump3df)
|
||||
{
|
||||
if (argv.argc() > 1)
|
||||
{
|
||||
// Print 3D floor info for a single sector.
|
||||
// This only checks the primary level.
|
||||
int sec = (int)strtoll(argv[1], NULL, 10);
|
||||
if ((unsigned)sec >= currentUILevel->sectors.Size())
|
||||
{
|
||||
Printf("Sector %d does not exist.\n", sec);
|
||||
return;
|
||||
}
|
||||
sector_t *sector = ¤tUILevel->sectors[sec];
|
||||
TArray<F3DFloor*> & ffloors = sector->e->XFloor.ffloors;
|
||||
|
||||
for (unsigned int i = 0; i < ffloors.Size(); i++)
|
||||
{
|
||||
double height = ffloors[i]->top.plane->ZatPoint(sector->centerspot);
|
||||
double bheight = ffloors[i]->bottom.plane->ZatPoint(sector->centerspot);
|
||||
|
||||
IGNORE_FORMAT_PRE
|
||||
Printf("FFloor %d @ top = %f (model = %d), bottom = %f (model = %d), flags = %B, alpha = %d %s %s\n",
|
||||
i, height, ffloors[i]->top.model->sectornum,
|
||||
bheight, ffloors[i]->bottom.model->sectornum,
|
||||
ffloors[i]->flags, ffloors[i]->alpha, (ffloors[i]->flags&FF_EXISTS) ? "Exists" : "", (ffloors[i]->flags&FF_DYNAMIC) ? "Dynamic" : "");
|
||||
IGNORE_FORMAT_POST
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// print the group link table to the console
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
CCMD(dumplinktable)
|
||||
{
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
Printf("Portal displacements for %s:\n", Level->MapName.GetChars());
|
||||
for (int x = 1; x < Level->Displacements.size; x++)
|
||||
{
|
||||
for (int y = 1; y < Level->Displacements.size; y++)
|
||||
{
|
||||
FDisplacement &disp = Level->Displacements(x, y);
|
||||
Printf("%c%c(%6d, %6d)", TEXTCOLOR_ESCAPE, 'C' + disp.indirect, int(disp.pos.X), int(disp.pos.Y));
|
||||
}
|
||||
Printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue