CBaseAnimating::InvertBones
0x005e7d50 · 294 bytes · __thiscall
_ZN14CBaseAnimating11InvertBonesERK11matrix3x4_tPS1_P10CStudioHdrR9CBoneList
Decompiled
undefined (5 params)
/* CBaseAnimating::InvertBones(matrix3x4_t const&, matrix3x4_t const*, CStudioHdr*, CBoneList&) */
void __thiscall
CBaseAnimating::InvertBones
(CBaseAnimating *this,matrix3x4_t *param_1,matrix3x4_t *param_2,CStudioHdr *param_3,
CBoneList *param_4)
{
int iVar1;
matrix3x4_t *pmVar2;
Quaternion *pQVar3;
int iVar4;
Vector *pVVar5;
matrix3x4_t local_7c [48];
matrix3x4_t local_4c [60];
*(ushort *)param_4 = *(ushort *)param_4 & 1 | (short)*(undefined4 *)(*(int *)param_3 + 0x9c) * 2;
iVar1 = *(int *)param_3;
if (0 < *(int *)(iVar1 + 0x9c)) {
pQVar3 = (Quaternion *)(param_4 + 0x604);
pVVar5 = (Vector *)(param_4 + 4);
iVar4 = 0;
pmVar2 = param_2;
do {
iVar1 = iVar1 + iVar4 * 0xd8 + *(int *)(iVar1 + 0xa0);
if ((*(uint *)(iVar1 + 0xa0) & 0x7ff00) == 0) {
*(undefined4 *)pQVar3 = 0;
*(undefined4 *)(pQVar3 + 4) = 0;
*(undefined4 *)(pQVar3 + 8) = 0;
*(undefined4 *)(pQVar3 + 0xc) = 0x3f800000;
*(undefined4 *)pVVar5 = 0;
*(undefined4 *)(pVVar5 + 4) = 0;
*(undefined4 *)(pVVar5 + 8) = 0;
}
else {
iVar1 = *(int *)(iVar1 + 4);
if (iVar1 == -1) {
MatrixInvert(param_1,local_7c);
}
else {
MatrixInvert(param_2 + iVar1 * 0x30,local_7c);
}
ConcatTransforms(local_7c,pmVar2,local_4c);
MatrixAngles(local_4c,pQVar3,pVVar5);
}
iVar4 = iVar4 + 1;
pmVar2 = pmVar2 + 0x30;
pQVar3 = pQVar3 + 0x10;
pVVar5 = pVVar5 + 0xc;
iVar1 = *(int *)param_3;
} while (iVar4 < *(int *)(iVar1 + 0x9c));
}
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.