CTongue::AbilityDebug
0x0083f5c0 · 434 bytes · __thiscall
_ZN7CTongue12AbilityDebugEP13CTerrorPlayerPKcz
Decompiled
undefined (3 params)
/* CTongue::AbilityDebug(CTerrorPlayer*, char const*, ...) */
void __thiscall CTongue::AbilityDebug(CTongue *this,CTerrorPlayer *param_1,char *param_2,...)
{
uint uVar1;
int *piVar2;
int *piVar3;
char *pcVar4;
undefined4 uVar5;
int iVar6;
undefined *puVar7;
undefined4 *puVar8;
int in_GS_OFFSET;
byte bVar9;
undefined4 local_1220;
undefined4 local_121c [63];
undefined4 local_1120;
undefined4 local_111c [63];
char local_1020 [4096];
int local_20;
bVar9 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar1 = *(uint *)(this + 0x44c);
if ((((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) ||
(piVar2 = *(int **)(puVar7 + 4), piVar2 == (int *)0x0)) goto LAB_0083f60d;
V_vsnprintf(local_1020,0x1000,param_2,&stack0x00000010);
puVar8 = local_121c;
for (iVar6 = 0x3f; iVar6 != 0; iVar6 = iVar6 + -1) {
*puVar8 = 0;
puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
}
local_1220 = 0;
piVar3 = (int *)TheLog();
(**(code **)(*piVar3 + 0x14))(piVar3,piVar2,&local_1220,0x100);
local_1120 = 0;
puVar8 = local_111c;
for (iVar6 = 0x3f; iVar6 != 0; iVar6 = iVar6 + -1) {
*puVar8 = 0;
puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
}
if (param_1 == (CTerrorPlayer *)0x0) {
if (*(int *)(TongueDebug._28_4_ + 0x30) != 0) {
pcVar4 = "<NONE>";
goto LAB_0083f70b;
}
}
else {
piVar3 = (int *)TheLog();
(**(code **)(*piVar3 + 0x14))(piVar3,param_1,&local_1120,0x100);
if (*(int *)(TongueDebug._28_4_ + 0x30) != 0) {
pcVar4 = (char *)(**(code **)(*(int *)param_1 + 0xb8))(param_1);
LAB_0083f70b:
uVar5 = (**(code **)(*piVar2 + 0xb8))(piVar2);
DevMsg("(TONGUE) %s Smoker: %s. Victim: %s.\n",local_1020,uVar5,pcVar4);
}
}
UTIL_LogPrintf("(TONGUE) %s Smoker:%s. Victim:%s.\n",local_1020,&local_1220,&local_1120);
LAB_0083f60d:
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.