RagdollSetupAnimatedFriction
0x004a2d90 · 186 bytes · __cdecl
_Z28RagdollSetupAnimatedFrictionP19IPhysicsEnvironmentP9ragdoll_ti
Decompiled
undefined (3 params)
/* RagdollSetupAnimatedFriction(IPhysicsEnvironment*, ragdoll_t*, int) */
void RagdollSetupAnimatedFriction(IPhysicsEnvironment *param_1,ragdoll_t *param_2,int param_3)
{
char cVar1;
int iVar2;
int *piVar3;
char *pcVar4;
iVar2 = (**(code **)(*modelinfo + 0x18))(modelinfo,param_3);
if (iVar2 == 0) {
return;
}
piVar3 = (int *)(**(code **)(*physcollision + 0xa0))(physcollision,iVar2);
do {
cVar1 = (**(code **)(*piVar3 + 0xc))(piVar3);
while( true ) {
if (cVar1 != '\0') {
/* WARNING: Could not recover jumptable at 0x004a2e39. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*physcollision + 0xa4))();
return;
}
pcVar4 = (char *)(**(code **)(*piVar3 + 8))(piVar3);
iVar2 = _V_stricmp(pcVar4,"animatedfriction");
if (iVar2 != 0) break;
(**(code **)(*piVar3 + 0x30))(piVar3,param_2 + 0x84c,0);
cVar1 = (**(code **)(*piVar3 + 0xc))(piVar3);
}
(**(code **)(*piVar3 + 0x28))(piVar3);
} while( true );
}
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.