L L4D2node

Infected::CheckForBulletWoundEffect

0x00a0ee80 · 253 bytes · __thiscall

_ZN8Infected25CheckForBulletWoundEffectEiib

Decompiled

undefined (4 params)

/* Infected::CheckForBulletWoundEffect(int, int, bool) */

void __thiscall
Infected::CheckForBulletWoundEffect(Infected *this,int param_1,int param_2,bool param_3)

{
  int iVar1;
  char cVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  int *piVar5;
  int iVar6;
  int *piVar7;
  int iVar8;
  int iVar9;
  int aiStack_3c [11];
  
  if (((*(int *)(this + 0x1cf4) == -1) || (*(int *)(this + 0x1cf8) == -1)) &&
     (cVar2 = IsValidHitgroupForWound(this,param_2), cVar2 != '\0')) {
    uVar3 = CBaseEntity::GetGender((CBaseEntity *)this);
    puVar4 = (undefined4 *)GetDamageCutoutInfoArray(uVar3);
    iVar6 = puVar4[3];
    if (0 < iVar6) {
      piVar7 = (int *)*puVar4;
      iVar8 = 0;
      iVar9 = 0;
      do {
        if ((((char)piVar7[0x3a1] == '\0') || (param_3)) &&
           (((*(byte *)(piVar7 + 0x171) & 1) != 0 && (iVar1 = piVar7[5], 0 < iVar1)))) {
          piVar5 = piVar7;
          do {
            while (((*piVar5 < 0 || (*piVar5 != param_1)) || (7 < iVar9))) {
              piVar5 = piVar5 + 1;
              if (piVar5 == piVar7 + iVar1) goto LAB_00a0ef48;
            }
            piVar5 = piVar5 + 1;
            aiStack_3c[iVar9] = iVar8;
            iVar9 = iVar9 + 1;
          } while (piVar5 != piVar7 + iVar1);
        }
LAB_00a0ef48:
        iVar8 = iVar8 + 1;
        piVar7 = piVar7 + 0x3db;
      } while (iVar8 != iVar6);
      if (iVar9 != 0) {
        iVar6 = RandomInt(0,iVar9 + -1);
        RequestWound(this,aiStack_3c[iVar6]);
        return;
      }
    }
  }
  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)