L L4D2node

CIKContext::SolveAutoplayLocks

0x00b885f0 · 310 bytes · __thiscall

_ZN10CIKContext18SolveAutoplayLocksEP6VectorP10Quaternion

Decompiled

undefined (3 params)

/* CIKContext::SolveAutoplayLocks(Vector*, Quaternion*) */

void __thiscall CIKContext::SolveAutoplayLocks(CIKContext *this,Vector *param_1,Quaternion *param_2)

{
  matrix3x4_t *pmVar1;
  char cVar2;
  matrix3x4_t *pmVar3;
  mstudioiklock_t *pmVar4;
  int iVar5;
  int iVar6;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  do {
    pmVar3 = g_MatrixPool;
    if (g_MatrixPool == (matrix3x4_t *)0x0) {
      pmVar3 = (matrix3x4_t *)memalign(0x10,0x1800);
      if (((uint)pmVar3 & 0xf) != 0) {
        raise(5);
      }
      break;
    }
    cVar2 = ThreadInterlockedAssignIf64
                      (&g_MatrixPool,*(undefined4 *)g_MatrixPool,DAT_01047874 + -1,g_MatrixPool,
                       DAT_01047874);
  } while (cVar2 == '\0');
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_20 = 0;
  if (0 < *(int *)(this + 0x101c)) {
    iVar5 = 0;
    do {
      pmVar4 = (mstudioiklock_t *)CStudioHdr::pIKAutoplayLock(*(CStudioHdr **)(this + 0xff8),iVar5);
      iVar6 = iVar5 + 1;
      SolveLock(this,pmVar4,iVar5,param_1,param_2,pmVar3,(CBoneBitList *)&local_2c);
      iVar5 = iVar6;
    } while (iVar6 < *(int *)(this + 0x101c));
  }
  do {
    iVar5 = DAT_01047874;
    pmVar1 = g_MatrixPool;
    iVar6 = DAT_01047874 + 0x10001;
    *(matrix3x4_t **)pmVar3 = g_MatrixPool;
    cVar2 = ThreadInterlockedAssignIf64(&g_MatrixPool,pmVar3,iVar6,pmVar1,iVar5);
  } while (cVar2 == '\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)