L L4D2node

CSoundEmitterSystem::Init

0x004b6f70 · 150 bytes · __thiscall

_ZN19CSoundEmitterSystem4InitEv

Decompiled

undefined (1 param)

/* CSoundEmitterSystem::Init() */

void __thiscall CSoundEmitterSystem::Init(CSoundEmitterSystem *this)

{
  int *piVar1;
  int iVar2;
  
  piVar1 = (int *)CommandLine_Tier0();
  iVar2 = (**(code **)(*piVar1 + 0xc))(piVar1,"-makereslists",0);
  piVar1 = cvar;
  this[4] = (CSoundEmitterSystem)(iVar2 != 0);
  g_pClosecaption = (**(code **)(*piVar1 + 0x30))(piVar1,"closecaption");
  CUtlVector<AsyncCaption_t,CUtlMemory<AsyncCaption_t,int>>::RemoveAll
            ((CUtlVector<AsyncCaption_t,CUtlMemory<AsyncCaption_t,int>> *)(this + 0x44));
  CUtlMemory<AsyncCaption_t,int>::Purge((CUtlMemory<AsyncCaption_t,int> *)(this + 0x44));
  *(undefined4 *)(this + 0x54) = *(undefined4 *)(this + 0x44);
  AddCaptionFile(this,"resource/closecaption_english.dat");
  AddCaptionFile(this,"resource/subtitles_english.dat");
                    /* WARNING: Could not recover jumptable at 0x004b7004. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*soundemitterbase + 0x14))();
  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)