CC_SetDebugFilter
0x0075a2a0 · 209 bytes · __cdecl
_ZL17CC_SetDebugFilterRK8CCommand
Decompiled
undefined (1 param)
/* CC_SetDebugFilter(CCommand const&) */
void CC_SetDebugFilter(CCommand *param_1)
{
NextBotManager *this;
int iVar1;
int iVar2;
int iVar3;
char *pcVar4;
int in_GS_OFFSET;
int local_a4;
undefined1 local_a0;
int local_20;
iVar3 = 1;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)param_1 < 2) {
Msg("Debug filter cleared.\n");
iVar3 = TheNextBots();
*(undefined4 *)(iVar3 + 0x44) = 0;
}
else {
do {
while( true ) {
iVar1 = V_atoi(*(char **)(param_1 + iVar3 * 4 + 0x408));
if (iVar1 < 1) break;
iVar2 = TheNextBots();
iVar3 = iVar3 + 1;
local_a0 = 0;
local_a4 = iVar1;
CUtlVector<NextBotManager::DebugFilter,CUtlMemory<NextBotManager::DebugFilter,int>>::
InsertBefore((CUtlVector<NextBotManager::DebugFilter,CUtlMemory<NextBotManager::DebugFilter,int>>
*)(iVar2 + 0x38),*(int *)(iVar2 + 0x44),(DebugFilter *)&local_a4);
if (*(int *)param_1 <= iVar3) goto LAB_0075a342;
}
pcVar4 = "";
if (iVar3 < *(int *)param_1) {
pcVar4 = *(char **)(param_1 + iVar3 * 4 + 0x408);
}
this = (NextBotManager *)TheNextBots();
iVar3 = iVar3 + 1;
NextBotManager::DebugFilterAdd(this,pcVar4);
} while (iVar3 < *(int *)param_1);
}
LAB_0075a342:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.