CBaseAnimating::SetModel
0x005e9650 · 429 bytes · __thiscall
_ZN14CBaseAnimating8SetModelEPKc
Decompiled
undefined (2 params)
/* CBaseAnimating::SetModel(char const*) */
void __thiscall CBaseAnimating::SetModel(CBaseAnimating *this,char *param_1)
{
CStudioHdr *this_00;
int *piVar1;
undefined4 uVar2;
int iVar3;
int iVar4;
piVar1 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 005e9670 to 005e9707 has its CatchHandler @ 005e97fd */
UnlockStudioHdr(this);
if (*param_1 != '\0') {
uVar2 = (**(code **)(*modelinfo + 0xc))(modelinfo,param_1);
iVar3 = (**(code **)(*modelinfo + 8))(modelinfo,uVar2);
if (iVar3 != 0) {
iVar4 = (**(code **)(*modelinfo + 0x2c))(modelinfo,iVar3);
if (iVar4 != 3) {
uVar2 = (**(code **)(*modelinfo + 0x2c))(modelinfo,iVar3);
Msg("Setting CBaseAnimating to non-studio model %s (type:%i)\n",param_1,uVar2);
}
}
}
Studio_DestroyBoneCache(*(memhandle_t__ **)(this + 0x520));
*(undefined4 *)(this + 0x520) = 0;
UTIL_SetModel((CBaseEntity *)this,param_1);
this_00 = *(CStudioHdr **)(this + 0x13e0);
if (this_00 != (CStudioHdr *)0x0) {
CStudioHdr::Term(this_00);
*(undefined4 *)(this_00 + 0x4c) = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)(this_00 + 0x40));
*(undefined4 *)(this_00 + 0x50) = *(undefined4 *)(this_00 + 0x40);
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)(this_00 + 0x40));
*(undefined4 *)(this_00 + 0x38) = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)(this_00 + 0x2c));
*(undefined4 *)(this_00 + 0x3c) = *(undefined4 *)(this_00 + 0x2c);
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)(this_00 + 0x2c));
*(undefined4 *)(this_00 + 0x14) = 0;
CUtlMemory<studiohdr_t_const*,int>::Purge((CUtlMemory<studiohdr_t_const*,int> *)(this_00 + 8));
*(undefined4 *)(this_00 + 0x18) = *(undefined4 *)(this_00 + 8);
CUtlMemory<studiohdr_t_const*,int>::Purge((CUtlMemory<studiohdr_t_const*,int> *)(this_00 + 8));
operator_delete(this_00);
*(undefined4 *)(this + 0x13e0) = 0;
}
/* try { // try from 005e97a5 to 005e97eb has its CatchHandler @ 005e97fd */
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar3 != 0) {
LockStudioHdr(this);
}
if ((*(int **)(this + 0x13e0) != (int *)0x0) && (**(int **)(this + 0x13e0) != 0)) {
(**(code **)(*(int *)this + 0x374))(this);
SetSequence(this,0);
}
(**(code **)(*(int *)this + 0x36c))(this);
/* WARNING: Could not recover jumptable at 0x005e97fb. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*piVar1 + 0x6c))();
return;
}
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.