mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +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 constate_e ConsoleState;
|
||||
extern int ConBottom;
|
||||
|
||||
// Initialize the console
|
||||
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
|
||||
|
||||
extern event_t events[MAXEVENTS];
|
||||
extern int eventhead;
|
||||
extern int eventtail;
|
||||
|
||||
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)
|
||||
{
|
||||
if (this != currentUILevel) return; // only the primary level may exit.
|
||||
if (!isPrimaryLevel()) return; // only the primary level may exit.
|
||||
|
||||
FString nextlevel;
|
||||
level_info_t *nextinfo = nullptr;
|
||||
|
|
|
@ -438,7 +438,6 @@ struct cluster_info_t
|
|||
#define CLUSTER_ALLOWINTERMISSION 0x00000100 // Allow intermissions between levels in a hub.
|
||||
|
||||
extern TArray<level_info_t> wadlevelinfos;
|
||||
extern TArray<cluster_info_t> wadclusterinfos;
|
||||
|
||||
// mapname will be changed if it is a valid warptrans
|
||||
bool CheckWarpTransMap (FString &mapname, bool substitute);
|
||||
|
|
|
@ -223,3 +223,45 @@ void D_LoadWadSettings ()
|
|||
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
|
||||
|
||||
// Inspired by Maes
|
||||
extern int bmapnegx;
|
||||
extern int bmapnegy;
|
||||
|
||||
//#define GRAVITY FRACUNIT
|
||||
#define MAXMOVE (30.)
|
||||
|
||||
#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)
|
||||
{
|
||||
for (unsigned int i = 0; i < PlayerClasses.Size (); i++)
|
||||
|
|
Loading…
Reference in a new issue