CModelRender::IsModelInstanceValid
0x001891b0 · 72 bytes · __thiscall
_ZN12CModelRender20IsModelInstanceValidEt
Decompiled
undefined (2 params)
/* CModelRender::IsModelInstanceValid(unsigned short) */
bool __thiscall CModelRender::IsModelInstanceValid(CModelRender *this,ushort param_1)
{
int iVar1;
undefined4 *puVar2;
bool bVar3;
if (param_1 != 0xffff) {
puVar2 = (undefined4 *)((uint)param_1 * 0x108 + *(int *)(this + 0xc));
bVar3 = false;
if (puVar2[2] != 0) {
iVar1 = (**(code **)(*(int *)*puVar2 + 0x20))((int *)*puVar2);
bVar3 = iVar1 == puVar2[1];
}
return bVar3;
}
return false;
}
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.