L L4D2node

Boomer::DoBloodEffect

0x00a64690 · 461 bytes · __thiscall

_ZN6Boomer13DoBloodEffectEfRK15CTakeDamageInfoRK6VectorP10CGameTrace

Decompiled

undefined (5 params)

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

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

{
  float fVar1;
  int iVar2;
  undefined4 uVar3;
  longdouble lVar4;
  char *pcVar5;
  char *local_34 [4];
  char *local_24;
  char *local_20;
  
  CTerrorPlayer::DoBloodEffect((CTerrorPlayer *)this,param_1,param_2,param_3,param_4);
  if (((byte)param_2[0x48] & 2) != 0) {
    lVar4 = (longdouble)CountdownTimer::Now();
    if (*(float *)(this + 0x432c) <= (float)lVar4) {
      lVar4 = (longdouble)RandomFloat(0x3e4ccccd,0x3f333333);
      fVar1 = (float)lVar4;
      lVar4 = (longdouble)CountdownTimer::Now();
      if ((float)lVar4 + fVar1 != *(float *)(this + 0x432c)) {
        (**(code **)(*(int *)(this + 0x4324) + 4))(this + 0x4324,this + 0x432c);
        *(float *)(this + 0x432c) = (float)lVar4 + fVar1;
      }
      if (fVar1 != *(float *)(this + 0x4328)) {
        (**(code **)(*(int *)(this + 0x4324) + 4))(this + 0x4324,this + 0x4328);
        *(float *)(this + 0x4328) = fVar1;
      }
      local_34[2] = "leak_belly_tl";
      local_34[3] = "leak_belly_bl";
      local_24 = "leak_belly_tr";
      local_20 = "leak_belly_br";
      local_34[0] = "leak_head_l";
      local_34[1] = "leak_head_r";
      if (*(int *)(this + 0x4018) == 1) {
        iVar2 = *(int *)(param_4 + 0x44);
        if (iVar2 == 2) {
          RandomInt(0,0);
          pcVar5 = "leak_chest";
        }
        else if (iVar2 == 3) {
          iVar2 = RandomInt(0,3);
          pcVar5 = local_34[iVar2 + 2];
        }
        else {
          if (iVar2 != 1) {
            return;
          }
          iVar2 = RandomInt(0,1);
          pcVar5 = local_34[iVar2];
        }
        uVar3 = CBaseAnimating::LookupAttachment((CBaseAnimating *)this,pcVar5);
        DispatchParticleEffect("blood_impact_arterial_spray",5,this,uVar3,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)