L L4D2node

Infected::DoBloodEffect

0x00a0e770 · 484 bytes · __thiscall

_ZN8Infected13DoBloodEffectEfRK15CTakeDamageInfoRK6VectorP10CGameTrace

Decompiled

undefined (5 params)

/* Infected::DoBloodEffect(float, CTakeDamageInfo const&, Vector const&, CGameTrace*) */

void __thiscall
Infected::DoBloodEffect
          (Infected *this,float param_1,CTakeDamageInfo *param_2,Vector *param_3,CGameTrace *param_4
          )

{
  uint uVar1;
  char cVar2;
  undefined *puVar3;
  uint local_40;
  uint local_3c;
  uint local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  if (((((((((byte)this[0x1c74] & 0x20) == 0) || ((*(uint *)(param_2 + 0x48) & 0x20200002) == 0)) ||
         (uVar1 = *(uint *)(param_2 + 0x34), uVar1 == 0xffffffff)) ||
        ((puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc ||
         (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)))) ||
       ((*(int *)(puVar3 + 4) == 0 || (cVar2 = WasAttackedFromFront(this,param_2), cVar2 == '\0'))))
      && (param_1 != 0.0)) &&
     ((CBaseEntity::TraceBleed((CBaseEntity *)this,param_1,param_3,param_4,*(int *)(param_2 + 0x48))
      , *(int *)(param_4 + 0x44) != 1 ||
      ((*(int *)(param_2 + 0x48) != -0x80000000 &&
       (*(int *)(z_head_damage_causes_wounds._28_4_ + 0x30) == 0)))))) {
    local_40 = *(uint *)param_3 ^ 0x80000000;
    local_3c = *(uint *)(param_3 + 4) ^ 0x80000000;
    local_38 = *(uint *)(param_3 + 8) ^ 0x80000000;
    VectorAngles((Vector *)&local_40,(QAngle *)&local_34);
    if (((byte)this[0x14d] & 0x10) != 0) {
      CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
    }
    local_20 = *(undefined4 *)(this + 0x27c);
    local_28 = *(undefined4 *)(this + 0x274);
    local_24 = *(undefined4 *)(this + 0x278);
    if (((byte)param_2[0x4b] & 0x20) == 0) {
      DispatchParticleEffect
                ("blood_impact_infected_01",*(undefined4 *)(param_4 + 0xc),
                 *(undefined4 *)(param_4 + 0x10),*(undefined4 *)(param_4 + 0x14),local_28,local_24,
                 local_20,local_34,local_30,local_2c,0,0,0xffffffff);
    }
    else {
      DispatchParticleEffect
                ("blood_impact_infected_01_shotgun",*(undefined4 *)(param_4 + 0xc),
                 *(undefined4 *)(param_4 + 0x10),*(undefined4 *)(param_4 + 0x14),local_28,local_24,
                 local_20,local_34,local_30,local_2c,0,0,0xffffffff);
    }
  }
  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)