CC_SetDebug
0x00758b80 · 264 bytes · __cdecl
_ZL11CC_SetDebugRK8CCommand
Decompiled
undefined (1 param)
/* CC_SetDebug(CCommand const&) */
void CC_SetDebug(CCommand *param_1)
{
int iVar1;
undefined1 *puVar2;
char *pcVar3;
char *pcVar4;
int iVar5;
int iVar6;
uint local_24;
iVar1 = *(int *)param_1;
if (iVar1 < 2) {
Msg("Debugging stopped\n");
iVar1 = TheNextBots();
*(undefined4 *)(iVar1 + 0x34) = 0;
}
else {
local_24 = 0;
iVar5 = 1;
do {
pcVar4 = "BEHAVIOR";
iVar6 = 0;
while( true ) {
pcVar3 = "";
if (iVar5 < iVar1) {
pcVar3 = *(char **)(param_1 + iVar5 * 4 + 0x408);
}
if (*pcVar3 == '*') {
local_24 = 0xffff;
goto LAB_00758c26;
}
pcVar3 = "";
if (1 < iVar1) {
pcVar3 = *(char **)(param_1 + 0x40c);
}
iVar1 = _V_strlen(pcVar3);
pcVar3 = "";
if (iVar5 < *(int *)param_1) {
pcVar3 = *(char **)(param_1 + iVar5 * 4 + 0x408);
}
iVar1 = V_strnicmp(pcVar3,pcVar4,iVar1);
if (iVar1 == 0) {
local_24 = local_24 | 1 << ((byte)iVar6 & 0x1f);
iVar1 = *(int *)param_1;
goto LAB_00758c26;
}
iVar6 = iVar6 + 1;
pcVar4 = *(char **)(debugTypeName + iVar6 * 4);
if (pcVar4 == (char *)0x0) break;
iVar1 = *(int *)param_1;
}
puVar2 = &DAT_00d539c2;
if (iVar5 < *(int *)param_1) {
puVar2 = *(undefined1 **)(param_1 + iVar5 * 4 + 0x408);
}
Msg("Invalid debug type \'%s\'\n",puVar2);
iVar1 = *(int *)param_1;
LAB_00758c26:
iVar5 = iVar5 + 1;
} while (iVar5 < iVar1);
iVar1 = TheNextBots();
*(uint *)(iVar1 + 0x34) = local_24;
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.