CBaseAnimating::GetBoneCache
0x005e5380 · 446 bytes · __thiscall
_ZN14CBaseAnimating12GetBoneCacheEv
Decompiled
undefined (1 param)
/* CBaseAnimating::GetBoneCache() */
CBoneCache * __thiscall CBaseAnimating::GetBoneCache(CBaseAnimating *this)
{
char cVar1;
CBoneCache *pCVar2;
memhandle_t__ *pmVar3;
int iVar4;
int *piVar5;
int *piVar6;
int *local_182c;
matrix3x4_t *local_1828;
undefined4 local_1824;
undefined4 local_1820;
matrix3x4_t local_181c [6156];
piVar5 = *(int **)(this + 0x13e0);
if (piVar5 == (int *)0x0) {
iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar4 == 0) {
piVar5 = *(int **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
piVar5 = *(int **)(this + 0x13e0);
}
piVar6 = (int *)0x0;
if (piVar5 != (int *)0x0) goto LAB_005e539d;
}
else {
LAB_005e539d:
piVar6 = (int *)0x0;
if (*piVar5 != 0) {
piVar6 = piVar5;
}
}
pCVar2 = (CBoneCache *)Studio_GetBoneCache(*(memhandle_t__ **)(this + 0x520),false);
if (pCVar2 != (CBoneCache *)0x0) {
cVar1 = CBoneCache::IsValid(pCVar2,*(float *)(gpGlobals + 0xc),0.1);
if (cVar1 == '\0') {
if ((*(uint *)(pCVar2 + 4) & 0x300) == 0x300) goto LAB_005e54a0;
}
else if ((*(uint *)(pCVar2 + 4) & 0x300) == 0x300) {
if (*(float *)pCVar2 <= *(float *)(gpGlobals + 0xc)) {
return pCVar2;
}
LAB_005e54a0:
(**(code **)(*(int *)this + 0x35c))(this,local_181c,0x300);
CBoneCache::UpdateBones
(pCVar2,local_181c,*(int *)(*piVar6 + 0x9c),*(float *)(gpGlobals + 0xc));
return pCVar2;
}
Studio_DestroyBoneCache(*(memhandle_t__ **)(this + 0x520));
*(undefined4 *)(this + 0x520) = 0;
}
(**(code **)(*(int *)this + 0x35c))(this,local_181c,0x300);
local_1824 = *(undefined4 *)(gpGlobals + 0xc);
local_1820 = 0x300;
local_182c = piVar6;
local_1828 = local_181c;
pmVar3 = (memhandle_t__ *)Studio_CreateBoneCache((bonecacheparams_t *)&local_182c);
*(memhandle_t__ **)(this + 0x520) = pmVar3;
pCVar2 = (CBoneCache *)Studio_GetBoneCache(pmVar3,false);
return pCVar2;
}
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.