L L4D2node

z_wound_all

0x0051eaf0 · 205 bytes · __cdecl

_ZL11z_wound_allRK8CCommand

Decompiled

undefined (1 param)

/* z_wound_all(CCommand const&) */

void z_wound_all(CCommand *param_1)

{
  int iVar1;
  uint uVar2;
  int *piVar3;
  int iVar4;
  CBaseEntity *this;
  int *piVar5;
  Infected *this_00;
  undefined4 *puVar6;
  
  iVar1 = TheNextBots();
  uVar2 = (uint)*(ushort *)(iVar1 + 0x10);
  if (uVar2 != 0xffff) {
    iVar4 = *(int *)(iVar1 + 4);
    do {
      piVar5 = *(int **)(iVar4 + uVar2 * 8);
      piVar3 = (int *)(**(code **)(*piVar5 + 0xb4))(piVar5);
      iVar4 = (**(code **)(*piVar3 + 0x14c))(piVar3);
      if (iVar4 != 0) {
        this = (CBaseEntity *)(**(code **)(*piVar5 + 0xb4))(piVar5);
        iVar4 = CBaseEntity::GetGender(this);
        puVar6 = &gDamageCutoutInfoArray;
        if (iVar4 - 2U < 0x15) {
          puVar6 = *(undefined4 **)(CSWTCH_2386 + (iVar4 - 2U) * 4);
        }
        iVar4 = RandomInt(0,puVar6[3] + -1);
        piVar5 = (int *)(**(code **)(*piVar5 + 0xb4))(piVar5);
        this_00 = (Infected *)(**(code **)(*piVar5 + 0x14c))(piVar5);
        Infected::RequestWound(this_00,iVar4);
      }
      iVar4 = *(int *)(iVar1 + 4);
      uVar2 = (uint)*(ushort *)(iVar4 + 6 + uVar2 * 8);
    } while (uVar2 != 0xffff);
  }
  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)