mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- moved KEYCONF_only CCMDs out of play files.
This commit is contained in:
parent
32e5be83ea
commit
bf665961cc
7 changed files with 43 additions and 50 deletions
|
@ -51,7 +51,6 @@ constate_e;
|
||||||
extern int PrintColors[PRINTLEVELS + 2];
|
extern int PrintColors[PRINTLEVELS + 2];
|
||||||
|
|
||||||
extern constate_e ConsoleState;
|
extern constate_e ConsoleState;
|
||||||
extern int ConBottom;
|
|
||||||
|
|
||||||
// Initialize the console
|
// Initialize the console
|
||||||
void C_InitConsole (int width, int height, bool ingame);
|
void C_InitConsole (int width, int height, bool ingame);
|
||||||
|
|
|
@ -129,8 +129,6 @@ void D_Render(std::function<void()> action, bool interpolate);
|
||||||
#define MAXEVENTS 128
|
#define MAXEVENTS 128
|
||||||
|
|
||||||
extern event_t events[MAXEVENTS];
|
extern event_t events[MAXEVENTS];
|
||||||
extern int eventhead;
|
|
||||||
extern int eventtail;
|
|
||||||
|
|
||||||
extern gameaction_t gameaction;
|
extern gameaction_t gameaction;
|
||||||
|
|
||||||
|
|
|
@ -571,7 +571,7 @@ EXTERN_CVAR(Bool, sv_singleplayerrespawn)
|
||||||
|
|
||||||
void FLevelLocals::ChangeLevel(const char *levelname, int position, int flags, int nextSkill)
|
void FLevelLocals::ChangeLevel(const char *levelname, int position, int flags, int nextSkill)
|
||||||
{
|
{
|
||||||
if (this != currentUILevel) return; // only the primary level may exit.
|
if (!isPrimaryLevel()) return; // only the primary level may exit.
|
||||||
|
|
||||||
FString nextlevel;
|
FString nextlevel;
|
||||||
level_info_t *nextinfo = nullptr;
|
level_info_t *nextinfo = nullptr;
|
||||||
|
|
|
@ -438,7 +438,6 @@ struct cluster_info_t
|
||||||
#define CLUSTER_ALLOWINTERMISSION 0x00000100 // Allow intermissions between levels in a hub.
|
#define CLUSTER_ALLOWINTERMISSION 0x00000100 // Allow intermissions between levels in a hub.
|
||||||
|
|
||||||
extern TArray<level_info_t> wadlevelinfos;
|
extern TArray<level_info_t> wadlevelinfos;
|
||||||
extern TArray<cluster_info_t> wadclusterinfos;
|
|
||||||
|
|
||||||
// mapname will be changed if it is a valid warptrans
|
// mapname will be changed if it is a valid warptrans
|
||||||
bool CheckWarpTransMap (FString &mapname, bool substitute);
|
bool CheckWarpTransMap (FString &mapname, bool substitute);
|
||||||
|
|
|
@ -223,3 +223,45 @@ void D_LoadWadSettings ()
|
||||||
ParsingKeyConf = false;
|
ParsingKeyConf = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CCMD(clearplayerclasses)
|
||||||
|
{
|
||||||
|
if (ParsingKeyConf)
|
||||||
|
{
|
||||||
|
PlayerClasses.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ValidatePlayerClass(PClassActor *ti, const char *name);
|
||||||
|
|
||||||
|
CCMD(addplayerclass)
|
||||||
|
{
|
||||||
|
if (ParsingKeyConf && argv.argc() > 1)
|
||||||
|
{
|
||||||
|
PClassActor *ti = PClass::FindActor(argv[1]);
|
||||||
|
|
||||||
|
if (ValidatePlayerClass(ti, argv[1]))
|
||||||
|
{
|
||||||
|
FPlayerClass newclass;
|
||||||
|
|
||||||
|
newclass.Type = ti;
|
||||||
|
newclass.Flags = 0;
|
||||||
|
|
||||||
|
int arg = 2;
|
||||||
|
while (arg < argv.argc())
|
||||||
|
{
|
||||||
|
if (!stricmp(argv[arg], "nomenu"))
|
||||||
|
{
|
||||||
|
newclass.Flags |= PCF_NOMENU;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Printf("Unknown flag '%s' for player class '%s'\n", argv[arg], argv[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
arg++;
|
||||||
|
}
|
||||||
|
PlayerClasses.Push(newclass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,11 +55,6 @@ struct FLinePortal;
|
||||||
|
|
||||||
#define STEEPSLOPE (46342/65536.) // [RH] Minimum floorplane.c value for walking
|
#define STEEPSLOPE (46342/65536.) // [RH] Minimum floorplane.c value for walking
|
||||||
|
|
||||||
// Inspired by Maes
|
|
||||||
extern int bmapnegx;
|
|
||||||
extern int bmapnegy;
|
|
||||||
|
|
||||||
//#define GRAVITY FRACUNIT
|
|
||||||
#define MAXMOVE (30.)
|
#define MAXMOVE (30.)
|
||||||
|
|
||||||
#define TALKRANGE (128.)
|
#define TALKRANGE (128.)
|
||||||
|
|
|
@ -239,46 +239,6 @@ void SetupPlayerClasses ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (clearplayerclasses)
|
|
||||||
{
|
|
||||||
if (ParsingKeyConf)
|
|
||||||
{
|
|
||||||
PlayerClasses.Clear ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CCMD (addplayerclass)
|
|
||||||
{
|
|
||||||
if (ParsingKeyConf && argv.argc () > 1)
|
|
||||||
{
|
|
||||||
PClassActor *ti = PClass::FindActor(argv[1]);
|
|
||||||
|
|
||||||
if (ValidatePlayerClass(ti, argv[1]))
|
|
||||||
{
|
|
||||||
FPlayerClass newclass;
|
|
||||||
|
|
||||||
newclass.Type = ti;
|
|
||||||
newclass.Flags = 0;
|
|
||||||
|
|
||||||
int arg = 2;
|
|
||||||
while (arg < argv.argc())
|
|
||||||
{
|
|
||||||
if (!stricmp (argv[arg], "nomenu"))
|
|
||||||
{
|
|
||||||
newclass.Flags |= PCF_NOMENU;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Printf ("Unknown flag '%s' for player class '%s'\n", argv[arg], argv[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
arg++;
|
|
||||||
}
|
|
||||||
PlayerClasses.Push (newclass);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CCMD (playerclasses)
|
CCMD (playerclasses)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < PlayerClasses.Size (); i++)
|
for (unsigned int i = 0; i < PlayerClasses.Size (); i++)
|
||||||
|
|
Loading…
Reference in a new issue