CBasePlayer::OnRestore
0x007bfa60 · 203 bytes · __thiscall
_ZN11CBasePlayer9OnRestoreEv
Decompiled
undefined (1 param)
/* CBasePlayer::OnRestore() */
void __thiscall CBasePlayer::OnRestore(CBasePlayer *this)
{
uint uVar1;
CBaseEntity *pCVar2;
undefined4 uVar3;
int iVar4;
CStudioHdr *pCVar5;
undefined *puVar6;
CStudioHdr *pCVar7;
CBaseAnimatingOverlay::OnRestore((CBaseAnimatingOverlay *)this);
uVar1 = *(uint *)(this + 0x2088);
if (((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
pCVar2 = (CBaseEntity *)0x0;
}
else {
pCVar2 = *(CBaseEntity **)(puVar6 + 4);
}
SetViewEntity(this,pCVar2);
SetDefaultFOV(this,*(int *)(this + 0x1d6c));
pCVar5 = *(CStudioHdr **)(this + 0x13e0);
*(undefined4 *)(this + 0x2104) = 0;
if (pCVar5 == (CStudioHdr *)0x0) {
iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar4 == 0) {
pCVar5 = *(CStudioHdr **)(this + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
pCVar5 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar7 = (CStudioHdr *)0x0;
if (pCVar5 == (CStudioHdr *)0x0) goto LAB_007bfadc;
}
pCVar7 = (CStudioHdr *)0x0;
if (*(int *)pCVar5 != 0) {
pCVar7 = pCVar5;
}
LAB_007bfadc:
uVar3 = CBaseAnimating::LookupPoseParameter((CBaseAnimating *)this,pCVar7,"body_pitch");
*(undefined4 *)(this + 0x2114) = uVar3;
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.