CModelLoader::UnloadModel
0x0019c100 · 204 bytes · __thiscall
_ZN12CModelLoader11UnloadModelEP7model_t
Decompiled
undefined (2 params)
/* CModelLoader::UnloadModel(model_t*) */
void __thiscall CModelLoader::UnloadModel(CModelLoader *this,model_t *param_1)
{
int iVar1;
int in_GS_OFFSET;
model_t local_114 [260];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = *(int *)(param_1 + 0x110);
if (iVar1 == 2) {
Sprite_UnloadModel(this,param_1);
}
else if (iVar1 == 3) {
Studio_UnloadModel(this,param_1);
}
else if (iVar1 == 1) {
Map_UnloadModel(this,param_1);
(**(code **)(*(int *)g_pStringTableDictionary + 4))(g_pStringTableDictionary);
if (param_1 + 4 != local_114) {
V_strncpy((char *)local_114,(char *)(param_1 + 4),0x104);
}
(**(code **)(*g_pFileSystem + 0x20))(g_pFileSystem,local_114,&DAT_002a076d);
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
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.