L L4D2node

CGameClient::WriteGameSounds

0x001e97f0 · 352 bytes · __thiscall

_ZN11CGameClient15WriteGameSoundsER8bf_writei

Decompiled

undefined (3 params)

/* CGameClient::WriteGameSounds(bf_write&, int) */

void __thiscall CGameClient::WriteGameSounds(CGameClient *this,bf_write *param_1,int param_2)

{
  char cVar1;
  uchar *puVar2;
  undefined4 uVar3;
  undefined **local_b0;
  undefined1 local_ac;
  undefined4 local_a8;
  undefined4 local_a4;
  undefined4 local_a0;
  undefined8 local_9c;
  undefined4 local_94;
  undefined4 local_90;
  undefined8 local_8c;
  undefined4 local_84;
  undefined4 local_80;
  undefined1 local_7c;
  undefined8 local_78;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_58;
  undefined1 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  bf_write local_34 [36];
  
  if (0 < *(int *)(this + 0x1d760)) {
    puVar2 = (uchar *)NET_AllocPayload();
    local_a4 = 0;
    local_a0 = 0;
    local_9c = 0;
    local_94 = 0;
    local_90 = 0;
    local_8c = 0;
    local_84 = 0;
    local_80 = 0;
    local_7c = 0;
    local_78 = 0;
    local_70 = 0;
    local_6c = 0;
    local_ac = 1;
    local_a8 = 0;
    local_b0 = &PTR__SVC_Sounds_002a1dc8;
    local_54 = 0;
    local_58 = 0;
    local_50 = 0xffffffff;
    local_4c = 0;
                    /* try { // try from 001e98af to 001e98b3 has its CatchHandler @ 001e996c */
    bf_write::bf_write(local_34);
                    /* try { // try from 001e98d3 to 001e9932 has its CatchHandler @ 001e9950 */
    bf_write::StartWriting(local_34,puVar2,0x37aa0,0,-1);
    uVar3 = FillSoundsMessage(this,(SVC_Sounds *)&local_b0,param_2);
    SVC_Sounds::WriteToBuffer((SVC_Sounds *)&local_b0,param_1);
    cVar1 = CBaseClient::IsTracing((CBaseClient *)this);
    if (cVar1 != '\0') {
      CBaseClient::TraceNetworkData((CBaseClient *)this,param_1,"Sounds [count=%d]",uVar3);
    }
    local_b0 = &PTR__INetMessage_002a1188;
    NET_FreePayload(puVar2);
  }
  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)