CModelLoader::Sprite_UnloadModel
0x0019aab0 · 203 bytes · __thiscall
_ZN12CModelLoader18Sprite_UnloadModelEP7model_t
Decompiled
undefined (2 params)
/* CModelLoader::Sprite_UnloadModel(model_t*) */
void __thiscall CModelLoader::Sprite_UnloadModel(CModelLoader *this,model_t *param_1)
{
int iVar1;
char cVar2;
IMaterial *pIVar3;
int in_GS_OFFSET;
bool *in_stack_fffffec8;
undefined1 local_116;
bool local_115;
char local_114 [260];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
*(uint *)(param_1 + 0x108) = *(uint *)(param_1 + 0x108) & 0xfffffffe;
BuildSpriteLoadName((char *)(param_1 + 4),local_114,(int)&local_116,&local_115,in_stack_fffffec8);
pIVar3 = (IMaterial *)(**(code **)(*materials + 0x11c))(materials,local_114,"Other textures",1,0);
if (pIVar3 != (IMaterial *)0x0) {
cVar2 = (**(code **)(*(int *)pIVar3 + 0xa8))(pIVar3);
if (cVar2 == '\0') {
GL_UnloadMaterial(pIVar3);
}
}
if (*(void **)(param_1 + 0x140) != (void *)0x0) {
operator_delete__(*(void **)(param_1 + 0x140));
}
iVar1 = *(int *)(in_GS_OFFSET + 0x14);
*(undefined4 *)(param_1 + 0x140) = 0;
*(undefined4 *)(param_1 + 0x134) = 0;
if (local_10 == iVar1) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.