RagdollApplyAnimationAsVelocity
0x004a4730 · 282 bytes · __cdecl
_Z31RagdollApplyAnimationAsVelocityR9ragdoll_tPK11matrix3x4_t
Decompiled
undefined (2 params)
/* RagdollApplyAnimationAsVelocity(ragdoll_t&, matrix3x4_t const*) */
void RagdollApplyAnimationAsVelocity(ragdoll_t *param_1,matrix3x4_t *param_2)
{
int *piVar1;
ragdoll_t *prVar2;
int iVar3;
float local_90;
undefined4 local_8c;
undefined4 local_88;
undefined4 local_84;
undefined1 local_80 [12];
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
float local_68;
float local_64;
float local_60;
Quaternion local_5c [16];
matrix3x4_t local_4c [60];
if (0 < *(int *)param_1) {
prVar2 = param_1 + 0x18;
iVar3 = 0;
do {
MatrixInvert(param_2,local_4c);
MatrixAngles(local_4c,local_5c,(Vector *)&local_8c);
QuaternionAxisAngle(local_5c,(Vector *)&local_68,&local_90);
piVar1 = *(int **)prVar2;
local_68 = local_68 * local_90;
local_64 = local_64 * local_90;
local_60 = local_90 * local_60;
local_74 = local_8c;
local_70 = local_88;
local_6c = local_84;
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 0xec))(piVar1,local_80,&local_74);
(**(code **)(**(int **)prVar2 + 0xd8))(*(int **)prVar2,local_80,&local_68);
}
iVar3 = iVar3 + 1;
param_2 = param_2 + 0x30;
prVar2 = prVar2 + 0x54;
} while (iVar3 < *(int *)param_1);
}
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.