L L4D2node

physicssound::PlayBreakSounds

0x0077ef20 · 710 bytes · __cdecl

_ZN12physicssound15PlayBreakSoundsER10CUtlVectorINS_12breaksound_tE10CUtlMemoryIS1_iEE

Decompiled

undefined (1 param)

/* physicssound::PlayBreakSounds(CUtlVector<physicssound::breaksound_t,
   CUtlMemory<physicssound::breaksound_t, int> >&) */

void physicssound::PlayBreakSounds(CUtlVector *param_1)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  Vector *pVVar4;
  int in_GS_OFFSET;
  float fVar5;
  int local_134;
  int local_130;
  undefined **local_12c [8];
  undefined4 local_10c;
  undefined1 *local_108;
  undefined4 local_104;
  int local_100;
  undefined4 local_fc;
  undefined4 local_f8;
  Vector *local_f4;
  undefined4 local_f0;
  undefined4 local_ec;
  undefined1 local_e8;
  undefined1 local_e7;
  undefined1 local_e6;
  undefined4 local_e4;
  undefined4 local_e0;
  undefined4 local_dc;
  undefined4 local_d8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined4 local_c8;
  undefined4 local_c4;
  undefined4 local_c0;
  undefined4 local_bc;
  undefined4 local_b8;
  int local_b4;
  undefined1 local_b0;
  undefined4 local_ac;
  undefined1 local_a8 [128];
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_134 = *(int *)(param_1 + 0xc) + -1;
  if (-1 < local_134) {
    local_130 = local_134 * 0x10;
    do {
      pVVar4 = (Vector *)(local_130 + *(int *)param_1);
      iVar2 = (**(code **)(*physprops + 0x18))(physprops,*(undefined4 *)(pVVar4 + 0xc));
      pcVar3 = (char *)(**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar2 + 0x40));
      local_c8 = 0;
      local_c4 = 0x3f800000;
      local_c0 = 100;
      local_bc = 100;
      local_b8 = 100;
      local_b4 = 0x4b;
      local_a8[0] = 0;
      local_b0 = 0;
      local_ac = 0;
      local_28 = 0;
      local_24 = 0;
      cVar1 = CBaseEntity::GetParametersForSound(pcVar3,(CSoundParameters *)&local_c8,(char *)0x0);
      iVar2 = local_b4;
      if (cVar1 == '\0') goto LAB_0077f1be;
      CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_12c);
      local_12c[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 0077ef8f to 0077ef93 has its CatchHandler @ 0077f1e7 */
      CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_12c,pVVar4);
      fVar5 = 4.0;
      local_12c[0] = &PTR__CPASAttenuationFilter_00c08ec8;
      if (0x32 < iVar2) {
        fVar5 = 20.0 / (float)(iVar2 + -0x32);
      }
                    /* try { // try from 0077efcb to 0077efcf has its CatchHandler @ 0077f246 */
      CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_12c,pVVar4,fVar5);
      local_cc = 0xffff;
      local_108 = local_a8;
      local_fc = 0;
      local_f0 = 0;
      local_100 = local_b4;
      local_ec = 0;
      local_e8 = 1;
      local_e7 = 0;
      local_f8 = local_c0;
      local_e6 = 0;
      local_e4 = 0xffffffff;
      local_e0 = 0;
      local_dc = 0;
      local_d8 = 0;
      local_d4 = 0;
      local_d0 = 0;
      local_10c = 6;
      local_104 = local_c4;
      local_f4 = pVVar4;
                    /* try { // try from 0077f0a4 to 0077f0a8 has its CatchHandler @ 0077f1fe */
      CBaseEntity::EmitSound((IRecipientFilter *)local_12c,0,(EmitSound_t *)&local_10c);
      local_d4 = 0;
      CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_e0);
      local_d0 = local_e0;
      CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_e0);
      local_12c[0] = &PTR__CPASFilter_00bfaf28;
      CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_12c);
      local_134 = local_134 + -1;
      local_130 = local_130 + -0x10;
    } while (local_134 != -1);
  }
  *(undefined4 *)(param_1 + 0xc) = 0;
LAB_0077f1be:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)