L L4D2node

ModelSoundsCache_LoadModel

0x006097c0 · 142 bytes · __cdecl

_Z26ModelSoundsCache_LoadModelPKc

Decompiled

undefined (1 param)

/* ModelSoundsCache_LoadModel(char const*) */

CStudioHdr * ModelSoundsCache_LoadModel(char *param_1)

{
  int iVar1;
  studiohdr_t *psVar2;
  CStudioHdr *this;
  
  iVar1 = (**(code **)(*engine + 0x14))(engine,param_1,1);
  if (iVar1 != -1) {
    iVar1 = (**(code **)(*modelinfo + 8))(modelinfo,iVar1);
    if (iVar1 != 0) {
      psVar2 = (studiohdr_t *)(**(code **)(*modelinfo + 0x7c))(modelinfo,iVar1);
      this = operator_new(0x68);
                    /* try { // try from 00609831 to 00609835 has its CatchHandler @ 00609851 */
      CStudioHdr::CStudioHdr(this,psVar2,mdlcache);
      if (*(int *)this != 0) {
        return this;
      }
    }
  }
  return (CStudioHdr *)0x0;
}

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)