Skip to content

Commit

Permalink
* prevent nummonsters cmd without cheats
Browse files Browse the repository at this point in the history
  • Loading branch information
WALL OF JUSTICE committed Mar 6, 2024
1 parent b99b5dd commit cdc0f11
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/interface/consolecommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1297,14 +1297,29 @@ namespace ConsoleCommands {
});

static ConsoleCommand ccmd_nummonsters2("/nummonsters2", "display number of NPCs in the level", []CCMD{
if ( !(svFlags & SV_FLAG_CHEATS) )
{
messagePlayer(clientnum, MESSAGE_MISC, Language::get(277));
return;
}
messagePlayer(clientnum, MESSAGE_MISC, Language::get(2353), list_Size(map.creatures));
});

static ConsoleCommand ccmd_nummonsters("/nummonsters", "display number of monsters in the level", []CCMD{
if ( !(svFlags & SV_FLAG_CHEATS) )
{
messagePlayer(clientnum, MESSAGE_MISC, Language::get(277));
return;
}
messagePlayer(clientnum, MESSAGE_MISC, Language::get(2353), nummonsters);
});

static ConsoleCommand ccmd_verifycreaturelist("/verifycreaturelist", "", []CCMD{
if ( !(svFlags & SV_FLAG_CHEATS) )
{
messagePlayer(clientnum, MESSAGE_MISC, Language::get(277));
return;
}
//Make sure that the number of creatures in the creature list are the real count in the game world.
unsigned entcount = 0;

Expand Down

0 comments on commit cdc0f11

Please sign in to comment.