CDynamicProp::CreateBoneFollowers
0x007ef0b0 · 425 bytes · __thiscall
_ZN12CDynamicProp19CreateBoneFollowersEv
Decompiled
undefined (1 param)
/* CDynamicProp::CreateBoneFollowers() */
void __thiscall CDynamicProp::CreateBoneFollowers(CDynamicProp *this)
{
code *pcVar1;
char cVar2;
KeyValues *pKVar3;
undefined4 uVar4;
char *pcVar5;
char *pcVar6;
vcollide_t *pvVar7;
uint in_stack_ffffffc8;
if (*(int *)(this + 0x15a4) == 0) {
pKVar3 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffc8);
/* try { // try from 007ef0f9 to 007ef0fd has its CatchHandler @ 007ef25e */
KeyValues::KeyValues(pKVar3,"",(IKeyValuesSystem *)0x0,false);
pcVar1 = *(code **)(*modelinfo + 0x54);
uVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
pcVar5 = (char *)(*pcVar1)(modelinfo,uVar4);
pcVar1 = *(code **)(*modelinfo + 0x10);
uVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
pcVar6 = (char *)(*pcVar1)(modelinfo,uVar4);
cVar2 = KeyValues::LoadFromBuffer(pKVar3,pcVar6,pcVar5,(IBaseFileSystem *)0x0,(char *)0x0);
if (((cVar2 != '\0') &&
(pKVar3 = (KeyValues *)KeyValues::FindKey(pKVar3,"bone_followers",false),
pKVar3 != (KeyValues *)0x0)) &&
(pKVar3 = (KeyValues *)KeyValues::GetFirstSubKey(pKVar3), pKVar3 != (KeyValues *)0x0)) {
do {
pcVar5 = (char *)KeyValues::GetString(pKVar3,(char *)0x0,"");
CBoneFollowerManager::AddBoneFollower
((CBoneFollowerManager *)(this + 0x15a4),(CBaseAnimating *)this,pcVar5,
(solid_t *)0x0);
pKVar3 = (KeyValues *)KeyValues::GetNextKey(pKVar3);
} while (pKVar3 != (KeyValues *)0x0);
}
KeyValues::deleteThis();
if (*(int *)(this + 0x15a4) == 0) {
pcVar1 = *(code **)(*modelinfo + 0x18);
uVar4 = (**(code **)(*(int *)this + 0x1c))(this);
pvVar7 = (vcollide_t *)(*pcVar1)(modelinfo,uVar4);
if ((pvVar7 != (vcollide_t *)0x0) && (1 < (*(ushort *)pvVar7 & 0x7fff))) {
CreateBoneFollowersFromRagdoll
((CBaseAnimating *)this,(CBoneFollowerManager *)(this + 0x15a4),pvVar7);
}
}
}
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.