RagdollComputeApproximateBbox
0x004a4c80 · 223 bytes · __cdecl
_Z29RagdollComputeApproximateBboxRK9ragdoll_tRK6VectorRS2_S5_
Decompiled
undefined (4 params)
/* RagdollComputeApproximateBbox(ragdoll_t const&, Vector const&, Vector&, Vector&) */
void RagdollComputeApproximateBbox
(ragdoll_t *param_1,Vector *param_2,Vector *param_3,Vector *param_4)
{
float fVar1;
float fVar2;
int iVar3;
int iVar4;
matrix3x4_t *pmVar5;
float fVar6;
float fVar7;
undefined4 local_40 [3];
undefined4 local_34 [3];
Vector local_28 [24];
ClearBounds((Vector *)local_40,(Vector *)local_34);
iVar4 = 0;
pmVar5 = (matrix3x4_t *)(param_1 + 0x30);
if (0 < *(int *)param_1) {
do {
if (*(int *)(pmVar5 + -0x18) != 0) {
MatrixGetColumn(pmVar5,3,local_28);
iVar3 = 0;
fVar1 = *(float *)(pmVar5 + -4);
do {
fVar7 = *(float *)(local_28 + iVar3 * 4);
fVar6 = fVar7 - fVar1;
fVar7 = fVar7 + fVar1;
fVar2 = *(float *)((Vector *)local_40 + iVar3 * 4);
if (fVar2 <= fVar6) {
fVar6 = fVar2;
}
fVar2 = *(float *)((Vector *)local_34 + iVar3 * 4);
if (fVar7 <= fVar2) {
fVar7 = fVar2;
}
*(float *)((Vector *)local_40 + iVar3 * 4) = fVar6;
*(float *)((Vector *)local_34 + iVar3 * 4) = fVar7;
iVar3 = iVar3 + 1;
} while (iVar3 != 3);
}
iVar4 = iVar4 + 1;
pmVar5 = pmVar5 + 0x54;
} while (iVar4 < *(int *)param_1);
}
*(undefined4 *)param_3 = local_40[0];
*(undefined4 *)(param_3 + 4) = local_40[1];
*(undefined4 *)(param_3 + 8) = local_40[2];
*(undefined4 *)param_4 = local_34[0];
*(undefined4 *)(param_4 + 4) = local_34[1];
*(undefined4 *)(param_4 + 8) = local_34[2];
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.