L L4D2node

Boomer::OnTakeDamage

0x00a64e10 · 107 bytes · __thiscall

_ZN6Boomer12OnTakeDamageERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* Boomer::OnTakeDamage(CTakeDamageInfo const&) */

undefined4 __thiscall Boomer::OnTakeDamage(Boomer *this,CTakeDamageInfo *param_1)

{
  uint uVar1;
  CTerrorPlayer *this_00;
  undefined4 uVar2;
  undefined *puVar3;
  
  if (*(int *)(this + 0x4018) != 1) {
    uVar2 = CTerrorPlayer::OnTakeDamage((CTerrorPlayer *)this,param_1);
    return uVar2;
  }
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
     ((this_00 = *(CTerrorPlayer **)(puVar3 + 4), this_00 != (CTerrorPlayer *)0x0 &&
      (this_00 == (CTerrorPlayer *)this)))) {
    uVar2 = CTerrorPlayer::OnTakeDamage(this_00,param_1);
    return uVar2;
  }
  return 0;
}

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)