diff --git a/src/g_cvars.cpp b/src/g_cvars.cpp index 3fc48ff860..67d18179fa 100644 --- a/src/g_cvars.cpp +++ b/src/g_cvars.cpp @@ -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); + } + } +} diff --git a/src/g_dumpinfo.cpp b/src/g_dumpinfo.cpp index 84a296d27f..9501b452f7 100644 --- a/src/g_dumpinfo.cpp +++ b/src/g_dumpinfo.cpp @@ -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 & 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"); + } + } +} + + + + diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index d132da69fc..1d3e2d4c50 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -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 & 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 - } - } -} diff --git a/src/p_destructible.cpp b/src/p_destructible.cpp index 5a9c564482..4794b7ed48 100755 --- a/src/p_destructible.cpp +++ b/src/p_destructible.cpp @@ -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" diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 073d6d9b89..82c4e40b16 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -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; diff --git a/src/portal.cpp b/src/portal.cpp index 6cca8385d7..5a9c8b3a60 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -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"); - } - } -} - - - - diff --git a/src/skins.h b/src/skins.h deleted file mode 100644 index 8ce1f99cb5..0000000000 --- a/src/skins.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef __SKINS_H__ -#define __SKINS_H__ - -#endif //__SKINS_H__ diff --git a/src/tagitem.h b/src/tagitem.h deleted file mode 100644 index e69de29bb2..0000000000