L L4D2node

CCSPlayer::OnDamagedByExplosion

0x00651ae0 · 191 bytes · __thiscall

_ZN9CCSPlayer20OnDamagedByExplosionERK15CTakeDamageInfo

Decompiled

undefined (2 params)

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

void __thiscall CCSPlayer::OnDamagedByExplosion(CCSPlayer *this,CTakeDamageInfo *param_1)

{
  float fVar1;
  uint uVar2;
  CBaseEntity *this_00;
  undefined *puVar3;
  
  fVar1 = *(float *)(param_1 + 0x3c);
  uVar2 = *(uint *)(param_1 + 0x30);
  if ((((uVar2 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar2 >> 0xc)) &&
     (this_00 = *(CBaseEntity **)(puVar3 + 4), this_00 != (CBaseEntity *)0x0)) {
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
  }
  if (30.0 <= fVar1) {
    fVar1 = *(float *)(gpGlobals + 0xc);
    *(undefined4 *)(this + 0x2a0c) = 0;
    *(float *)(this + 0x2a08) = fVar1 + 0.3;
  }
  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)