Add locatelump command
This commit is contained in:
parent
4849f06880
commit
bdd51b4505
1 changed files with 27 additions and 0 deletions
|
|
@ -199,6 +199,7 @@ static void Command_LeaveParty_f(void);
|
|||
static void Command_Addfilelocal(void);
|
||||
static void Command_Addfile(void);
|
||||
static void Command_ListWADS_f(void);
|
||||
static void Command_LocateLump_f(void);
|
||||
static void Command_ListDoomednums_f(void);
|
||||
static void Command_RunSOC(void);
|
||||
static void Command_Pause(void);
|
||||
|
|
@ -942,6 +943,7 @@ void D_RegisterServerCommands(void)
|
|||
COM_AddCommand("addfilelocal", Command_Addfilelocal);
|
||||
COM_AddCommand("addfile", Command_Addfile);
|
||||
COM_AddCommand("listwad", Command_ListWADS_f);
|
||||
COM_AddCommand("locatelump", Command_LocateLump_f);
|
||||
COM_AddCommand("listmapthings", Command_ListDoomednums_f);
|
||||
|
||||
COM_AddCommand("runsoc", Command_RunSOC);
|
||||
|
|
@ -5413,6 +5415,31 @@ static void Command_ListWADS_f(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void Command_LocateLump_f(void)
|
||||
{
|
||||
if (COM_Argc() == 1)
|
||||
{
|
||||
CONS_Printf("Usage: locatelump <lump1>[ <lump2>[ ...]]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (INT32 i = 1; i < COM_Argc(); ++i)
|
||||
{
|
||||
const char *name = COM_Argv(i);
|
||||
|
||||
lumpnum_t num = W_CheckNumForName(name);
|
||||
|
||||
const char *wadname = "(not found)";
|
||||
|
||||
if (num != LUMPERROR)
|
||||
{
|
||||
wadname = wadfiles[WADFILENUM(num)]->filename;
|
||||
}
|
||||
|
||||
CONS_Printf("%s - %s\n", name, wadname);
|
||||
}
|
||||
}
|
||||
|
||||
#define MAXDOOMEDNUM 4095
|
||||
|
||||
static void Command_ListDoomednums_f(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue