MCPcopy Create free account
hub / github.com/ZDoom/Raze / genericCheat

Function genericCheat

source/core/cheats.cpp:94–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92//---------------------------------------------------------------------------
93
94void genericCheat(int player, uint8_t** stream, bool skip)
95{
96 int cheat = ReadByte(stream);
97 if (skip) return;
98 const char *msg = gi->GenericCheat(player, cheat);
99 if (!msg || !*msg) // Don't print blank lines.
100 return;
101
102 if (player == myconnectindex)
103 Printf(PRINT_NOTIFY, "%s\n", msg);
104 else
105 {
106 FString message = GStrings.GetString("TXT_X_CHEATS");
107 //message.Substitute("%s", player->userinfo.GetName()); // fixme - make globally accessible
108 Printf(PRINT_NOTIFY, "%s: %s\n", message.GetChars(), msg);
109 }
110}
111
112//---------------------------------------------------------------------------
113//

Callers

nothing calls this directly

Calls 5

PrintfFunction · 0.85
ReadByteFunction · 0.70
GenericCheatMethod · 0.45
GetStringMethod · 0.45
GetCharsMethod · 0.45

Tested by

no test coverage detected