mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- 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
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "c_cvars.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "g_game.h"
|
||||
|
||||
CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE)
|
||||
CVAR(Bool, var_pushers, true, CVAR_SERVERINFO);
|
||||
|
@ -88,6 +89,23 @@ CUSTOM_CVAR (Int, cl_maxdecals, 1024, CVAR_ARCHIVE)
|
|||
}
|
||||
|
||||
|
||||
// [BC] Allow the maximum number of particles to be specified by a cvar (so people
|
||||
// with lots of nice hardware can have lots of particles!).
|
||||
CUSTOM_CVAR(Int, r_maxparticles, 4000, CVAR_ARCHIVE)
|
||||
{
|
||||
if (self == 0)
|
||||
self = 4000;
|
||||
else if (self > 65535)
|
||||
self = 65535;
|
||||
else if (self < 100)
|
||||
self = 100;
|
||||
|
||||
|
||||
if (gamestate != GS_STARTUP)
|
||||
{
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
P_InitParticles(Level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#include "p_spec.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "actorinlines.h"
|
||||
#include "maploader/maploader.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -859,35 +858,3 @@ int P_Find3DFloor(sector_t * sec, const DVector3 &pos, bool above, bool floor, d
|
|||
return -1;
|
||||
}
|
||||
|
||||
#include "c_dispatch.h"
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "actor.h"
|
||||
#include "p_trace.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "r_sky.h"
|
||||
#include "p_local.h"
|
||||
#include "p_maputl.h"
|
||||
#include "c_cvars.h"
|
||||
|
|
|
@ -55,6 +55,7 @@ CVAR (Bool, r_rail_smartspiral, 0, CVAR_ARCHIVE);
|
|||
CVAR (Int, r_rail_spiralsparsity, 1, CVAR_ARCHIVE);
|
||||
CVAR (Int, r_rail_trailsparsity, 1, CVAR_ARCHIVE);
|
||||
CVAR (Bool, r_particles, true, 0);
|
||||
EXTERN_CVAR(Int, r_maxparticles);
|
||||
|
||||
FRandom pr_railtrail("RailTrail");
|
||||
|
||||
|
@ -116,26 +117,6 @@ inline particle_t *NewParticle (FLevelLocals *Level)
|
|||
//
|
||||
void P_InitParticles (FLevelLocals *);
|
||||
|
||||
// [BC] Allow the maximum number of particles to be specified by a cvar (so people
|
||||
// with lots of nice hardware can have lots of particles!).
|
||||
CUSTOM_CVAR( Int, r_maxparticles, 4000, CVAR_ARCHIVE )
|
||||
{
|
||||
if ( self == 0 )
|
||||
self = 4000;
|
||||
else if (self > 65535)
|
||||
self = 65535;
|
||||
else if (self < 100)
|
||||
self = 100;
|
||||
|
||||
if ( gamestate != GS_STARTUP )
|
||||
{
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
P_InitParticles(Level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void P_InitParticles (FLevelLocals *Level)
|
||||
{
|
||||
const char *i;
|
||||
|
|
|
@ -1198,31 +1198,3 @@ bool FLevelLocals::CollectConnectedGroups(int startgroup, const DVector3 &positi
|
|||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#ifndef __SKINS_H__
|
||||
#define __SKINS_H__
|
||||
|
||||
#endif //__SKINS_H__
|
Loading…
Reference in a new issue