CRagdoll2::GetBoneMatrix
0x004a18b0 · 336 bytes · __thiscall
_ZN9CRagdoll213GetBoneMatrixER13CBoneAccessori
Decompiled
undefined (3 params)
/* CRagdoll2::GetBoneMatrix(CBoneAccessor&, int) */
undefined4 __thiscall CRagdoll2::GetBoneMatrix(CRagdoll2 *this,CBoneAccessor *param_1,int param_2)
{
CRagdoll2 *pCVar1;
float fVar2;
int iVar3;
int *piVar4;
undefined4 uVar5;
matrix3x4_t *pmVar6;
matrix3x4_t *pmVar7;
undefined4 *puVar8;
Vector local_58 [12];
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
matrix3x4_t local_1c [12];
iVar3 = *(int *)(this + param_2 * 4 + 0x7f4);
if (-1 < iVar3) {
pCVar1 = this + param_2 * 0x54 + 0x14;
uVar5 = 0;
piVar4 = *(int **)(pCVar1 + 0x10);
if (piVar4 != (int *)0x0) {
(**(code **)(*piVar4 + 0x50))((matrix3x4_t *)&local_4c,piVar4);
if ((-1 < (int)*(float *)(pCVar1 + 0x1c)) && (this[0xc] == (CRagdoll2)0x0)) {
VectorTransform((float *)pCVar1,
(matrix3x4_t *)
(*(int *)(this + (int)*(float *)(pCVar1 + 0x1c) * 4 + 0x7f4) * 0x30 +
*(int *)(param_1 + 4)),(float *)local_58);
MatrixSetColumn(local_58,3,(matrix3x4_t *)&local_4c);
}
fVar2 = *(float *)(this + 0x8a8);
pmVar6 = (matrix3x4_t *)&local_4c;
do {
pmVar7 = pmVar6 + 0x10;
*(float *)pmVar6 = *(float *)pmVar6 * fVar2;
*(float *)(pmVar6 + 4) = *(float *)(pmVar6 + 4) * fVar2;
*(float *)(pmVar6 + 8) = *(float *)(pmVar6 + 8) * fVar2;
pmVar6 = pmVar7;
} while (pmVar7 != local_1c);
puVar8 = (undefined4 *)(iVar3 * 0x30 + *(int *)(param_1 + 4));
*puVar8 = local_4c;
puVar8[1] = local_48;
puVar8[2] = local_44;
puVar8[3] = local_40;
puVar8[4] = local_3c;
puVar8[5] = local_38;
puVar8[6] = local_34;
puVar8[7] = local_30;
puVar8[8] = local_2c;
puVar8[9] = local_28;
puVar8[10] = local_24;
puVar8[0xb] = local_20;
uVar5 = 1;
}
return uVar5;
}
return 0;
}
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.