L L4D2node

CCSPlayer::EmitPrivateSound

0x0065a920 · 311 bytes · __thiscall

_ZN9CCSPlayer16EmitPrivateSoundEPKc

Decompiled

undefined (2 params)

/* CCSPlayer::EmitPrivateSound(char const*) */

void __thiscall CCSPlayer::EmitPrivateSound(CCSPlayer *this,char *param_1)

{
  char cVar1;
  int iVar2;
  int in_GS_OFFSET;
  undefined **local_e8 [8];
  undefined4 local_c8;
  undefined4 local_c4;
  undefined4 local_c0;
  undefined4 local_bc;
  undefined4 local_b8;
  undefined4 local_b4;
  undefined1 local_b0;
  undefined4 local_ac;
  undefined1 local_a8;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_a8 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_c8 = 0;
  local_c4 = 0x3f800000;
  local_c0 = 100;
  local_bc = 100;
  local_b8 = 100;
  local_b4 = 0x4b;
  local_b0 = 0;
  local_ac = 0;
  local_28 = 0;
  local_24 = 0;
  cVar1 = CBaseEntity::GetParametersForSound(param_1,(CSoundParameters *)&local_c8,(char *)0x0);
  if (cVar1 != '\0') {
    CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_e8);
    local_e8[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
                    /* try { // try from 0065a9ff to 0065aa03 has its CatchHandler @ 0065aa85 */
    CRecipientFilter::AddRecipient((CRecipientFilter *)local_e8,(CBasePlayer *)this);
    if (*(int *)(this + 0x30) == 0) {
      iVar2 = 0;
    }
    else {
      iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
                    /* try { // try from 0065aa3a to 0065aa3e has its CatchHandler @ 0065aa69 */
    CBaseEntity::EmitSound
              ((IRecipientFilter *)local_e8,iVar2,param_1,(Vector *)0x0,0.0,(float *)0x0);
    local_e8[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
    CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_e8);
  }
  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)