L L4D2node

Studio_CreateBoneCache

0x00b903a0 · 253 bytes · __cdecl

_Z22Studio_CreateBoneCacheR17bonecacheparams_t

Decompiled

undefined (1 param)

/* Studio_CreateBoneCache(bonecacheparams_t&) */

undefined8 Studio_CreateBoneCache(bonecacheparams_t *param_1)

{
  uint uVar1;
  ushort uVar2;
  uint uVar3;
  void *pvVar4;
  undefined4 uVar5;
  bool bVar6;
  
  uVar3 = ThreadGetCurrentId();
  if (uVar3 != DAT_0104794c) {
    LOCK();
    bVar6 = DAT_0104794c != 0;
    uVar1 = uVar3;
    if (bVar6) {
      uVar1 = DAT_0104794c;
    }
    DAT_0104794c = uVar1;
    UNLOCK();
    if (bVar6) {
      CThreadFastMutex::Lock(0x104794c,uVar3);
      goto LAB_00b903d7;
    }
  }
  DAT_01047950 = DAT_01047950 + 1;
LAB_00b903d7:
                    /* try { // try from 00b903f4 to 00b90410 has its CatchHandler @ 00b904d9 */
  CDataManagerBase::EnsureCapacity
            ((CDataManagerBase *)&g_StudioBoneCache,*(int *)(**(int **)param_1 + 0x9c) * 0x34);
  pvVar4 = (void *)CBoneCache::CreateResource(param_1);
  (*(code *)*g_StudioBoneCache)(&g_StudioBoneCache);
                    /* try { // try from 00b90420 to 00b90442 has its CatchHandler @ 00b9049f */
  uVar2 = CDataManagerBase::CreateHandle((CDataManagerBase *)&g_StudioBoneCache,false);
  uVar5 = CDataManagerBase::StoreResourceInHandle
                    ((CDataManagerBase *)&g_StudioBoneCache,uVar2,pvVar4,*(uint *)((int)pvVar4 + 8))
  ;
  (*(code *)g_StudioBoneCache[2])(&g_StudioBoneCache);
  DAT_01047950 = DAT_01047950 - 1;
  uVar3 = DAT_01047950;
  if (DAT_01047950 == 0) {
    LOCK();
    UNLOCK();
    uVar3 = DAT_0104794c;
    DAT_0104794c = 0;
  }
  return CONCAT44(uVar3,uVar5);
}

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)