L L4D2node

Studio_GetBoneCache

0x00b902a0 · 146 bytes · __cdecl

_Z19Studio_GetBoneCacheP13memhandle_t__b

Decompiled

undefined (2 params)

/* Studio_GetBoneCache(memhandle_t__*, bool) */

void Studio_GetBoneCache(memhandle_t__ *param_1,bool param_2)

{
  uint uVar1;
  uint uVar2;
  bool bVar3;
  
  uVar2 = ThreadGetCurrentId();
  if (uVar2 != DAT_0104794c) {
    LOCK();
    bVar3 = DAT_0104794c != 0;
    uVar1 = uVar2;
    if (bVar3) {
      uVar1 = DAT_0104794c;
    }
    DAT_0104794c = uVar1;
    UNLOCK();
    if (bVar3) {
      CThreadFastMutex::Lock(0x104794c,uVar2);
      goto LAB_00b902d3;
    }
  }
  DAT_01047950 = DAT_01047950 + 1;
LAB_00b902d3:
  if (param_2) {
    CDataManagerBase::LockResource((CDataManagerBase *)&g_StudioBoneCache,param_1);
  }
  else {
                    /* try { // try from 00b902e5 to 00b90314 has its CatchHandler @ 00b9033c */
    CDataManagerBase::GetResource_NoLock((CDataManagerBase *)&g_StudioBoneCache,param_1);
  }
  DAT_01047950 = DAT_01047950 + -1;
  if (DAT_01047950 == 0) {
    LOCK();
    UNLOCK();
    DAT_0104794c = 0;
  }
  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)