L L4D2node

CBaseGrenade::GetThrower

0x00414a90 · 167 bytes · __thiscall

_ZN12CBaseGrenade10GetThrowerEv

Decompiled

undefined (1 param)

/* CBaseGrenade::GetThrower() */

int __thiscall CBaseGrenade::GetThrower(CBaseGrenade *this)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  undefined *puVar4;
  
  uVar1 = *(uint *)(this + 0x1a58);
  if ((((uVar1 == 0xffffffff) ||
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
     ((piVar2 = *(int **)(puVar4 + 4), piVar2 == (int *)0x0 ||
      (iVar3 = (**(code **)(*piVar2 + 0x144))(piVar2), iVar3 == 0)))) {
    uVar1 = *(uint *)(this + 0x220);
    if ((uVar1 == 0xffffffff) ||
       ((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc ||
        (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)))) {
      return 0;
    }
    iVar3 = 0;
    if (*(int **)(puVar4 + 4) != (int *)0x0) {
                    /* WARNING: Could not recover jumptable at 0x00414b38. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      iVar3 = (**(code **)(**(int **)(puVar4 + 4) + 0x144))();
      return iVar3;
    }
  }
  return iVar3;
}

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)