mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 18:21:06 +00:00
- transitioned Blood's give command and changed SW's not to call the cheat handler.
This commit is contained in:
parent
3e5e956b72
commit
fb334e7f1a
8 changed files with 141 additions and 84 deletions
|
@ -138,4 +138,32 @@ CCMD(allmap)
|
|||
gFullMap = !gFullMap;
|
||||
Printf("%s\n", GStrings(gFullMap ? "SHOW MAP: ON" : "SHOW MAP: OFF"));
|
||||
}
|
||||
}
|
||||
|
||||
CCMD(give)
|
||||
{
|
||||
static const char* type[] = { "ALL","AMMO","ARMOR","HEALTH","INVENTORY","ITEMS","KEYS","WEAPONS",nullptr };
|
||||
if (argv.argc() < 2)
|
||||
{
|
||||
Printf("give <all|health|weapons|ammo|armor|keys|inventory>: gives requested item\n");
|
||||
return;
|
||||
}
|
||||
size_t found = -1;
|
||||
for (size_t i = 0; i < countof(type); i++)
|
||||
{
|
||||
if (!stricmp(argv[1], type[i]))
|
||||
{
|
||||
found = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == -1)
|
||||
{
|
||||
Printf("Unable to give %s\n", argv[1]);
|
||||
}
|
||||
if (!CheckCheatmode(true, true))
|
||||
{
|
||||
Net_WriteByte(DEM_GIVE);
|
||||
Net_WriteByte(found);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue