CBasePlayer::SetModel
0x007c0790 · 135 bytes · __thiscall
_ZN11CBasePlayer8SetModelEPKc
Decompiled
undefined (2 params)
/* CBasePlayer::SetModel(char const*) */
void __thiscall CBasePlayer::SetModel(CBasePlayer *this,char *param_1)
{
int *piVar1;
CStudioHdr *pCVar2;
undefined4 uVar3;
int iVar4;
CStudioHdr *pCVar5;
CBaseFlex::SetModel((CBaseFlex *)this,param_1);
piVar1 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
pCVar2 = *(CStudioHdr **)(this + 0x13e0);
if (pCVar2 == (CStudioHdr *)0x0) {
/* try { // try from 007c07fb to 007c080b has its CatchHandler @ 007c081a */
iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar4 != 0) {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
}
pCVar2 = *(CStudioHdr **)(this + 0x13e0);
pCVar5 = (CStudioHdr *)0x0;
if (pCVar2 == (CStudioHdr *)0x0) goto LAB_007c07cb;
}
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar2 != 0) {
pCVar5 = pCVar2;
}
LAB_007c07cb:
/* try { // try from 007c07da to 007c07de has its CatchHandler @ 007c081a */
uVar3 = CBaseAnimating::LookupPoseParameter((CBaseAnimating *)this,pCVar5,"body_pitch");
*(undefined4 *)(this + 0x2114) = uVar3;
/* WARNING: Could not recover jumptable at 0x007c07f3. 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.