L L4D2node

RadiusDamage

0x005f5230 · 215 bytes · __cdecl

_Z12RadiusDamageRK15CTakeDamageInfoRK6VectorfiP11CBaseEntity

Decompiled

undefined (5 params)

/* RadiusDamage(CTakeDamageInfo const&, Vector const&, float, int, CBaseEntity*) */

void RadiusDamage(CTakeDamageInfo *param_1,Vector *param_2,float param_3,int param_4,
                 CBaseEntity *param_5)

{
  uint uVar1;
  float fVar2;
  CBaseEntity *pCVar3;
  undefined *puVar4;
  
  (**(code **)(*g_pGameRules + 0x104))(g_pGameRules,param_1,param_2,param_3,param_4,param_5);
  if (((byte)param_1[0x48] & 0x40) != 0) {
    uVar1 = *(uint *)(param_1 + 0x30);
    pCVar3 = (CBaseEntity *)0x0;
    fVar2 = param_3 * 1.5;
    if (fVar2 <= 128.0) {
      fVar2 = 128.0;
    }
    if (((uVar1 != 0xffffffff) &&
        (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
      pCVar3 = *(CBaseEntity **)(puVar4 + 4);
    }
    CSoundEnt::InsertSound(0x2000001,param_2,(int)fVar2,0.25,pCVar3,0,(CBaseEntity *)0x0);
  }
  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)