BuildBoneChain
0x00b872a0 · 275 bytes · __cdecl
_Z14BuildBoneChainPK10CStudioHdrRK11matrix3x4_tPK6VectorPK10QuaternioniPS2_R12CBoneBitList
Decompiled
undefined (7 params)
/* BuildBoneChain(CStudioHdr const*, matrix3x4_t const&, Vector const*, Quaternion const*, int,
matrix3x4_t*, CBoneBitList&) */
void BuildBoneChain(CStudioHdr *param_1,matrix3x4_t *param_2,Vector *param_3,Quaternion *param_4,
int param_5,matrix3x4_t *param_6,CBoneBitList *param_7)
{
int iVar1;
uint uVar2;
matrix3x4_t local_4c [60];
uVar2 = 1 << ((byte)param_5 & 0x1f);
if ((*(uint *)(param_7 + ((uint)param_5 >> 5) * 4) & uVar2) != 0) {
return;
}
QuaternionMatrix(param_4 + param_5 * 0x10,param_3 + param_5 * 0xc,local_4c);
iVar1 = *(int *)(*(int *)(param_1 + 0x40) + param_5 * 4);
if (iVar1 == -1) {
if (((uint)param_2 & 0xf) == 0) {
ConcatTransforms_Aligned(param_2,local_4c,param_6 + param_5 * 0x30);
}
else {
ConcatTransforms(param_2,local_4c,param_6 + param_5 * 0x30);
}
}
else {
BuildBoneChain(param_1,param_2,param_3,param_4,iVar1,param_6,param_7);
ConcatTransforms_Aligned(param_6 + iVar1 * 0x30,local_4c,param_6 + param_5 * 0x30);
}
*(uint *)(param_7 + (param_5 >> 5) * 4) = *(uint *)(param_7 + (param_5 >> 5) * 4) | uVar2;
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.