L L4D2node

CEngineSoundServer::IsSoundPrecached

0x00157340 · 111 bytes · __thiscall

_ZN18CEngineSoundServer16IsSoundPrecachedEPKc

Decompiled

undefined (2 params)

/* CEngineSoundServer::IsSoundPrecached(char const*) */

bool __thiscall CEngineSoundServer::IsSoundPrecached(CEngineSoundServer *this,char *param_1)

{
  byte bVar1;
  int iVar2;
  byte *pbVar3;
  
  pbVar3 = (byte *)param_1;
  if (param_1 == (char *)0x0) {
LAB_00157388:
    iVar2 = SV_SoundIndex(param_1);
    return iVar2 != 0;
  }
  do {
    bVar1 = *pbVar3;
    if ((bVar1 & 0xfd) == 0x21) {
LAB_001573a0:
      if (bVar1 == 0x21) {
        return true;
      }
    }
    else if (2 < (byte)(bVar1 - 0x28)) {
      if (((byte)(bVar1 - 0x3e) < 3) || (bVar1 == 0x3c)) goto LAB_001573a0;
      if (((bVar1 != 0x5e) && (bVar1 != 0x7d)) && (bVar1 != 0x24)) goto LAB_00157388;
    }
    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)