MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Invoke

Function Invoke

engine/Poseidon/Dev/Debug/DebugCheats.cpp:96–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void Invoke(std::string_view args, std::string& out)
97{
98 // Accept "1"/"0"/"on"/"off"/"true"/"false"/"" (the bare command toggles).
99 bool target = !s_active;
100 if (args == "1" || args == "on" || args == "true")
101 target = true;
102 else if (args == "0" || args == "off" || args == "false")
103 target = false;
104 else if (!args.empty())
105 {
106 out = "god: expected 1|0|on|off (or empty to toggle), got: " + std::string(args);
107 return;
108 }
109 SetActive(target);
110 out = std::string("god: ") + (s_active ? "ON" : "OFF");
111}
112} // namespace Cmd_God
113
114// Cmd_InfiniteAmmo — sticky toggle. Same shape as Cmd_God; refunds

Callers 7

RegisterAllMethod · 0.85
DrawCheatsTabFunction · 0.85
TriCheatUnlockCampaignFunction · 0.85
TriCheatStorePositionFunction · 0.85
TriCheatSaveGameFunction · 0.85
TriCheatLoadGameFunction · 0.85
TriEndMissionFunction · 0.85

Calls 15

InvokeHoursFunction · 0.85
InvokeOvercastFunction · 0.85
SetValueFunction · 0.85
DebugUnlockAllCampaignsFunction · 0.85
NormalizeSavePathFunction · 0.85
GetSaveDirectoryFunction · 0.85
sizeMethod · 0.80
GetCameraMethod · 0.80
DirectionUpMethod · 0.80
GetTimeOfDayMethod · 0.80
GetRealPlayerMethod · 0.80
SurfaceYAboveWaterMethod · 0.80

Tested by 5

TriCheatUnlockCampaignFunction · 0.68
TriCheatStorePositionFunction · 0.68
TriCheatSaveGameFunction · 0.68
TriCheatLoadGameFunction · 0.68
TriEndMissionFunction · 0.68