RagdollExtractBoneIndices
0x004a4940 · 274 bytes · __cdecl
_Z25RagdollExtractBoneIndicesPiP10CStudioHdrP10vcollide_t
Decompiled
undefined (3 params)
/* RagdollExtractBoneIndices(int*, CStudioHdr*, vcollide_t*) */
int RagdollExtractBoneIndices(int *param_1,CStudioHdr *param_2,vcollide_t *param_3)
{
int *piVar1;
char cVar2;
int *piVar3;
char *pcVar4;
int iVar5;
int iVar6;
int in_GS_OFFSET;
char local_660 [1600];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
piVar3 = (int *)(**(code **)(*physcollision + 0xa0))(physcollision,param_3);
iVar6 = 0;
LAB_004a4990:
do {
cVar2 = (**(code **)(*piVar3 + 0xc))(piVar3);
while( true ) {
if (cVar2 != '\0') {
(**(code **)(*physcollision + 0xa4))(physcollision,piVar3);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
pcVar4 = (char *)(**(code **)(*piVar3 + 8))(piVar3);
iVar5 = _V_stricmp(pcVar4,"solid");
if (iVar5 != 0) break;
(**(code **)(*piVar3 + 0x10))(piVar3,local_660,0);
if (0x17 < iVar6) goto LAB_004a4990;
piVar1 = param_1 + iVar6;
iVar6 = iVar6 + 1;
iVar5 = Studio_BoneIndexByName(param_2,local_660);
*piVar1 = iVar5;
cVar2 = (**(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.