L L4D2node

CCSPlayer::OnTakeDamage_Alive

0x0065e7c0 · 144 bytes · __thiscall

_ZN9CCSPlayer18OnTakeDamage_AliveERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* CCSPlayer::OnTakeDamage_Alive(CTakeDamageInfo const&) */

bool __thiscall CCSPlayer::OnTakeDamage_Alive(CCSPlayer *this,CTakeDamageInfo *param_1)

{
  code *pcVar1;
  int iVar2;
  CAI_Concept local_24 [20];
  
  *(uint *)(this + 0x1d54) = *(uint *)(this + 0x1d54) | *(uint *)(param_1 + 0x48);
  iVar2 = CBaseCombatCharacter::OnTakeDamage_Alive((CBaseCombatCharacter *)this,param_1);
  if (iVar2 != 0) {
    (**(code **)(*(int *)this + 0x7d8))(this,param_1);
    pcVar1 = *(code **)(*(int *)this + 0x7b4);
    CAI_Concept::CAI_Concept(local_24,"Pain");
    (*pcVar1)(this,local_24,1,0,0,0,0);
  }
  return iVar2 != 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)