L L4D2node

CTongue::AbilityDebug

0x0083f490 · 284 bytes · __thiscall

_ZN7CTongue12AbilityDebugEPKcz

Decompiled

undefined (2 params)

/* CTongue::AbilityDebug(char const*, ...) */

void __thiscall CTongue::AbilityDebug(CTongue *this,char *param_1,...)

{
  uint uVar1;
  int *piVar2;
  int *piVar3;
  undefined4 uVar4;
  int iVar5;
  undefined *puVar6;
  undefined4 *puVar7;
  int in_GS_OFFSET;
  byte bVar8;
  undefined4 local_1120;
  undefined4 local_111c [63];
  char local_1020 [4096];
  int local_20;
  
  bVar8 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((((*(int *)(TongueDebug._28_4_ + 0x30) != 0) &&
       (uVar1 = *(uint *)(this + 0x44c), uVar1 != 0xffffffff)) &&
      (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar6 + 8) == uVar1 >> 0xc &&
      (piVar2 = *(int **)(puVar6 + 4), piVar2 != (int *)0x0)))) {
    V_vsnprintf(local_1020,0x1000,param_1,&stack0x0000000c);
    puVar7 = local_111c;
    for (iVar5 = 0x3f; iVar5 != 0; iVar5 = iVar5 + -1) {
      *puVar7 = 0;
      puVar7 = puVar7 + (uint)bVar8 * -2 + 1;
    }
    local_1120 = 0;
    piVar3 = (int *)TheLog();
    (**(code **)(*piVar3 + 0x14))(piVar3,piVar2,&local_1120,0x100);
    uVar4 = (**(code **)(*piVar2 + 0xb8))(piVar2);
    DevMsg("(TONGUE) %s  Smoker: %s\n",local_1020,uVar4);
    UTIL_LogPrintf("(TONGUE) %s  Smoker:%s.\n",local_1020,&local_1120);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)