Studio_InvalidateBoneCache
0x00b905a0 · 136 bytes · __cdecl
_Z26Studio_InvalidateBoneCacheP13memhandle_t__
Decompiled
undefined (1 param)
/* Studio_InvalidateBoneCache(memhandle_t__*) */
uint Studio_InvalidateBoneCache(memhandle_t__ *param_1)
{
uint uVar1;
uint uVar2;
undefined4 *puVar3;
bool bVar4;
uVar2 = ThreadGetCurrentId();
if (uVar2 != DAT_0104794c) {
LOCK();
bVar4 = DAT_0104794c != 0;
uVar1 = uVar2;
if (bVar4) {
uVar1 = DAT_0104794c;
}
DAT_0104794c = uVar1;
UNLOCK();
if (bVar4) {
CThreadFastMutex::Lock(0x104794c,uVar2);
goto LAB_00b905cf;
}
}
DAT_01047950 = DAT_01047950 + 1;
LAB_00b905cf:
/* try { // try from 00b905dd to 00b905e1 has its CatchHandler @ 00b9062c */
puVar3 = (undefined4 *)
CDataManagerBase::GetResource_NoLock((CDataManagerBase *)&g_StudioBoneCache,param_1);
if (puVar3 != (undefined4 *)0x0) {
*puVar3 = 0xbf800000;
}
uVar2 = DAT_0104794c;
DAT_01047950 = DAT_01047950 - 1;
if (DAT_01047950 == 0) {
LOCK();
DAT_0104794c = DAT_01047950;
UNLOCK();
return uVar2;
}
return DAT_01047950;
}
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.