L L4D2node

CBaseAnimating::BuildMatricesWithBoneMerge

0x005e4b30 · 323 bytes · __thiscall

_ZN14CBaseAnimating26BuildMatricesWithBoneMergeEPK10CStudioHdrRK11matrix3x4_tPK6VectorPK10QuaternionPS3_PS_P10CBoneCache

Decompiled

undefined (8 params)

/* CBaseAnimating::BuildMatricesWithBoneMerge(CStudioHdr const*, matrix3x4_t const&, Vector const*,
   Quaternion const*, matrix3x4_t*, CBaseAnimating*, CBoneCache*) */

void __thiscall
CBaseAnimating::BuildMatricesWithBoneMerge
          (CBaseAnimating *this,CStudioHdr *param_1,matrix3x4_t *param_2,Vector *param_3,
          Quaternion *param_4,matrix3x4_t *param_5,CBaseAnimating *param_6,CBoneCache *param_7)

{
  matrix3x4_t *pmVar1;
  int iVar2;
  CStudioHdr *pCVar3;
  int *piVar4;
  int iVar5;
  matrix3x4_t *pmVar6;
  CStudioHdr *local_58;
  Quaternion *local_54;
  Vector *local_50;
  matrix3x4_t local_4c [60];
  
  pCVar3 = *(CStudioHdr **)(param_6 + 0x13e0);
  if (pCVar3 == (CStudioHdr *)0x0) {
    iVar5 = CBaseEntity::GetModel((CBaseEntity *)param_6);
    if (iVar5 == 0) {
      pCVar3 = *(CStudioHdr **)(param_6 + 0x13e0);
    }
    else {
      LockStudioHdr(param_6);
      pCVar3 = *(CStudioHdr **)(param_6 + 0x13e0);
    }
    local_58 = (CStudioHdr *)0x0;
    if (pCVar3 == (CStudioHdr *)0x0) goto LAB_005e4b56;
  }
  local_58 = pCVar3;
  if (*(int *)pCVar3 == 0) {
    local_58 = (CStudioHdr *)0x0;
  }
LAB_005e4b56:
  iVar5 = *(int *)param_1;
  piVar4 = (int *)(*(int *)(iVar5 + 0xa0) + iVar5);
  if (0 < *(int *)(iVar5 + 0x9c)) {
    iVar5 = 0;
    local_54 = param_4;
    local_50 = param_3;
    pmVar6 = param_5;
    do {
      iVar2 = Studio_BoneIndexByName(local_58,(char *)(*piVar4 + (int)piVar4));
      if ((iVar2 < 0) ||
         (pmVar1 = (matrix3x4_t *)CBoneCache::GetCachedBone(param_7,iVar2),
         pmVar1 == (matrix3x4_t *)0x0)) {
        QuaternionMatrix(local_54,local_50,local_4c);
        if (piVar4[1] == -1) {
          ConcatTransforms(param_2,local_4c,pmVar6);
        }
        else {
          ConcatTransforms(param_5 + piVar4[1] * 0x30,local_4c,pmVar6);
        }
      }
      else {
        MatrixCopy(pmVar1,pmVar6);
      }
      iVar5 = iVar5 + 1;
      piVar4 = piVar4 + 0x36;
      local_54 = local_54 + 0x10;
      pmVar6 = pmVar6 + 0x30;
      local_50 = local_50 + 0xc;
    } while (iVar5 < *(int *)(*(int *)param_1 + 0x9c));
  }
  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)