L L4D2node

SV_BroadcastVoiceData

0x001fcbf0 · 633 bytes · __cdecl

_Z21SV_BroadcastVoiceDataP7IClientiPcx

Decompiled

undefined (4 params)

/* SV_BroadcastVoiceData(IClient*, int, char*, long long) */

void SV_BroadcastVoiceData(IClient *param_1,int param_2,char *param_3,longlong param_4)

{
  int *piVar1;
  int *piVar2;
  char cVar3;
  byte bVar4;
  int iVar5;
  undefined4 uVar6;
  IClient *pIVar7;
  int iVar8;
  int iVar9;
  byte local_b1;
  undefined **local_a8;
  undefined1 local_a4;
  undefined4 local_a0;
  undefined4 local_9c;
  undefined4 local_98;
  undefined8 local_94;
  undefined4 local_8c;
  undefined4 local_88;
  undefined8 local_84;
  undefined4 local_7c;
  undefined4 local_78;
  undefined1 local_74;
  undefined8 local_70;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_5c;
  byte local_58;
  int local_54;
  longlong local_50;
  byte local_48 [4];
  undefined4 local_44;
  undefined1 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  char *local_20;
  
  if (*(int *)(sv_voiceenable._28_4_ + 0x30) != 0) {
    local_74 = 0;
    local_84 = 0;
    local_9c = 0;
    local_98 = 0;
    local_70 = 0;
    local_94 = 0;
    local_8c = 0;
    local_88 = 0;
    local_7c = 0;
    local_78 = 0;
    local_68 = 0;
    local_64 = 0;
    local_a0 = 0;
    local_a8 = &PTR__SVC_VoiceData_002a1ac8;
    local_40 = 0;
    local_44 = 0;
    local_3c = 0xffffffff;
    local_38 = 0;
    local_a4 = 0;
    local_5c = (**(code **)(*(int *)param_1 + 0x3c))(param_1);
    iVar5 = param_2 << 3;
    local_20 = param_3;
    local_54 = iVar5;
    if (*(int *)(voice_debugfeedbackfrom._28_4_ + 0x30) != 0) {
      local_50 = param_4;
      iVar9 = (**(code **)(*(int *)param_1 + 0x3c))(param_1);
      uVar6 = (**(code **)(*(int *)param_1 + 0x48))(param_1);
      Msg("Sending voice from: %s - playerslot: %d [ xuid %llx ]\n",uVar6,iVar9 + 1,param_4);
      param_4 = local_50;
    }
    if (0 < DAT_003b8080) {
      iVar9 = 0;
      do {
        piVar1 = *(int **)(DAT_003b8074 + iVar9 * 4);
        pIVar7 = (IClient *)0x0;
        if (piVar1 != (int *)0x0) {
          pIVar7 = (IClient *)(piVar1 + 1);
        }
        local_50 = param_4;
        cVar3 = (**(code **)(*piVar1 + 0x74))(piVar1);
        param_4 = local_50;
        if (cVar3 != '\0') {
          cVar3 = (**(code **)(*piVar1 + 0x94))(piVar1);
          param_4 = local_50;
          if (cVar3 == '\0') {
            local_b1 = (**(code **)(*piVar1 + 0x84))(piVar1,local_5c);
            local_48[0] = local_b1;
            local_58 = (**(code **)(*piVar1 + 0x88))(piVar1,local_5c);
            iVar8 = 1;
            do {
              local_48[iVar8] = 1;
              piVar2 = (int *)piVar1[iVar8 + 6];
              param_4 = local_50;
              if (piVar2 != (int *)0x0) {
                bVar4 = (**(code **)(*piVar2 + 0x84))(piVar2,local_5c);
                local_b1 = local_b1 | bVar4;
                local_48[iVar8] = bVar4;
                bVar4 = (**(code **)(*piVar2 + 0x88))(piVar2,local_5c);
                local_58 = local_58 | bVar4;
                param_4 = local_50;
              }
              iVar8 = iVar8 + 1;
              local_50 = param_4;
            } while (iVar8 != 4);
            if ((local_b1 == 1) || (pIVar7 == param_1)) {
              local_54 = 0;
              if (local_b1 != 0) {
                local_54 = iVar5;
              }
              (**(code **)(*piVar1 + 100))(piVar1,&local_a8,0,1);
              param_4 = local_50;
            }
          }
        }
        iVar9 = iVar9 + 1;
      } while (iVar9 < DAT_003b8080);
    }
  }
  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)