L L4D2node

CBoneCache::CreateResource

0x00b8ffd0 · 237 bytes · __cdecl

_ZN10CBoneCache14CreateResourceERK17bonecacheparams_t

Decompiled

undefined (1 param)

/* CBoneCache::CreateResource(bonecacheparams_t const&) */

CBoneCache * CBoneCache::CreateResource(bonecacheparams_t *param_1)

{
  int *piVar1;
  int iVar2;
  CBoneCache *this;
  int iVar3;
  uint __size;
  int iVar4;
  short local_21c [128];
  short local_11c [134];
  
  piVar1 = *(int **)param_1;
  iVar3 = *(int *)(*piVar1 + 0x9c);
  iVar2 = 0;
  if (iVar3 < 1) {
    iVar4 = 0;
  }
  else {
    iVar4 = 0;
    do {
      while ((iVar2 == 0 || ((*(uint *)(param_1 + 0xc) & *(uint *)(piVar1[0xb] + iVar2 * 4)) != 0)))
      {
        local_21c[iVar2] = (short)iVar4;
        local_11c[iVar4] = (short)iVar2;
        iVar2 = iVar2 + 1;
        iVar4 = iVar4 + 1;
        iVar3 = *(int *)(*piVar1 + 0x9c);
        if (iVar3 <= iVar2) goto LAB_00b90045;
      }
      local_21c[iVar2] = -1;
      iVar2 = iVar2 + 1;
      iVar3 = *(int *)(*piVar1 + 0x9c);
    } while (iVar2 < iVar3);
LAB_00b90045:
    iVar2 = iVar4 * 0x30;
  }
  __size = iVar2 + 0x17 + (iVar3 + iVar4) * 2 & 0xfffffffc;
  this = malloc(__size);
  if (this != (CBoneCache *)0x0) {
    *(undefined4 *)(this + 8) = 0;
    *(undefined2 *)(this + 0xc) = 0;
  }
  Init(this,param_1,__size,local_21c,local_11c,iVar4);
  return this;
}

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)