CreateRagdollCache
0x004a2ca0 · 228 bytes · __cdecl
_Z18CreateRagdollCacheP10vcollide_tP20cache_ragdollsolid_tP25cache_ragdollconstraint_tP24cache_ragdoll2bodypart_tP15cache_ragdoll_t
Decompiled
undefined (5 params)
/* CreateRagdollCache(vcollide_t*, cache_ragdollsolid_t*, cache_ragdollconstraint_t*,
cache_ragdoll2bodypart_t*, cache_ragdoll_t*) */
void * CreateRagdollCache(vcollide_t *param_1,cache_ragdollsolid_t *param_2,
cache_ragdollconstraint_t *param_3,cache_ragdoll2bodypart_t *param_4,
cache_ragdoll_t *param_5)
{
void *pvVar1;
short sVar2;
short sVar3;
short sVar4;
void *pvVar5;
sVar2 = *(short *)(param_5 + 0x18);
sVar3 = *(short *)(param_5 + 0x1a);
sVar4 = *(short *)(param_5 + 0x1c);
pvVar5 = (void *)(**(code **)(*physcollision + 0xdc))
(physcollision,param_1,sVar3 * 100 + 0x20 + sVar2 * 0x38 + sVar4 * 8);
pvVar1 = (void *)((int)pvVar5 + 0x20);
_V_memcpy(pvVar5,param_5,0x20);
_V_memcpy(pvVar1,param_2,sVar2 * 0x38);
_V_memcpy((void *)(*(short *)((int)pvVar5 + 0x18) * 0x38 + (int)pvVar1),param_3,sVar3 * 100);
_V_memcpy((void *)((int)pvVar1 +
*(short *)((int)pvVar5 + 0x1a) * 100 + *(short *)((int)pvVar5 + 0x18) * 0x38),
param_4,sVar4 * 8);
return pvVar5;
}
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.