L L4D2node

CTankRock::Event_Killed

0x004dd390 · 222 bytes · __thiscall

_ZN9CTankRock12Event_KilledERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* CTankRock::Event_Killed(CTakeDamageInfo const&) */

void __thiscall CTankRock::Event_Killed(CTankRock *this,CTakeDamageInfo *param_1)

{
  uint uVar1;
  int *piVar2;
  code *pcVar3;
  char cVar4;
  int *piVar5;
  undefined4 uVar6;
  undefined *puVar7;
  
  piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"tank_rock_killed",0,0);
  if (piVar5 != (int *)0x0) {
    uVar1 = *(uint *)(param_1 + 0x34);
    if ((((uVar1 != 0xffffffff) &&
         (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) &&
       (piVar2 = *(int **)(puVar7 + 4), piVar2 != (int *)0x0)) {
      cVar4 = (**(code **)(*piVar2 + 0x16c))(piVar2);
      if (cVar4 != '\0') {
        pcVar3 = *(code **)(*piVar5 + 0x30);
        uVar6 = (**(code **)(*engine + 0x40))(engine,piVar2[0xc]);
        (*pcVar3)(piVar5,"userid",uVar6);
      }
    }
    (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
  }
  CBaseGrenade::Event_Killed((CTakeDamageInfo *)this);
  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)