From 6af14d17fd16c7f75347d67da5fe3ddb645642a9 Mon Sep 17 00:00:00 2001 From: drfrag666 Date: Fri, 22 Jun 2018 13:17:24 +0200 Subject: [PATCH] - Added some missing command versions of the original Doom cheats. --- src/c_cmds.cpp | 105 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index 0b03a951d..d871cd016 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -1295,6 +1295,111 @@ CCMD(secret) } } +//============================================================================ +// +// Missing cheats +// +//============================================================================ + +CCMD(idkfa) +{ + if (CheckCheatmode ()) + return; + + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_IDKFA); +} + +CCMD(idfa) +{ + if (CheckCheatmode ()) + return; + + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_IDFA); +} + +CCMD(idbehold) +{ + if (CheckCheatmode ()) + return; + + if (argv.argc() != 2) + { + Printf("inVuln, Str, Inviso, Rad, Allmap, or Lite-amp\n"); + return; + } + + switch (argv[1][0]) + { + case 'v': + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_BEHOLDV); + break; + case 's': + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_BEHOLDS); + break; + case 'i': + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_BEHOLDI); + break; + case 'r': + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_BEHOLDR); + break; + case 'a': + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_BEHOLDA); + break; + case 'l': + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_BEHOLDL); + break; + } +} + +EXTERN_CVAR (Int, am_cheat); + +CCMD(iddt) +{ + if (CheckCheatmode ()) + return; + + am_cheat = (am_cheat + 1) % 3; +} + +CCMD(idchoppers) +{ + if (CheckCheatmode ()) + return; + + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_CHAINSAW); +} + +CCMD(idclip) +{ + if (CheckCheatmode ()) + return; + + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_NOCLIP); +} + +CCMD(randi) +{ + if (CheckCheatmode ()) + return; + + Net_WriteByte (DEM_GIVECHEAT); + Net_WriteString ("health"); + Net_WriteLong(0); + Net_WriteByte (DEM_GIVECHEAT); + Net_WriteString ("greenarmor"); + Net_WriteLong(0); +} + CCMD(angleconvtest) { Printf("Testing degrees to angle conversion:\n");