L L4D2node

CEngineSoundServer::PrecacheSound

0x001573c0 · 184 bytes · __cdecl

_ZN18CEngineSoundServer13PrecacheSoundEPKcbb

Decompiled

undefined (3 params)

/* CEngineSoundServer::PrecacheSound(char const*, bool, bool) */

undefined4 CEngineSoundServer::PrecacheSound(char *param_1,bool param_2,bool param_3)

{
  byte bVar1;
  int iVar2;
  byte *pbVar3;
  undefined3 in_stack_00000009;
  
  pbVar3 = _param_2;
  if (_param_2 == (byte *)0x0) {
LAB_00157410:
    if ((char)*_param_2 < '!') {
      Host_Error("CEngineSoundServer::PrecacheSound:  Bad string: %s",_param_2);
    }
    iVar2 = SV_FindOrAddSound((char *)_param_2,param_3);
    if (iVar2 < 0) {
      Host_Error("CEngineSoundServer::PrecacheSound: \'%s\' overflow",_param_2);
      return 0;
    }
    return 1;
  }
  do {
    bVar1 = *pbVar3;
    if ((bVar1 & 0xfd) == 0x21) {
LAB_00157440:
      if (bVar1 == 0x21) {
        return 1;
      }
    }
    else if (2 < (byte)(bVar1 - 0x28)) {
      if (((byte)(bVar1 - 0x3e) < 3) || (bVar1 == 0x3c)) goto LAB_00157440;
      if (((bVar1 != 0x5e) && (bVar1 != 0x7d)) && (bVar1 != 0x24)) goto LAB_00157410;
    }
    pbVar3 = pbVar3 + 1;
  } while( true );
}

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)