CBasePlayer::EyePosition
0x00416250 · 255 bytes · __cdecl
_ZN11CBasePlayer11EyePositionEv
Decompiled
undefined (0 params)
/* CBasePlayer::EyePosition() */
int * CBasePlayer::EyePosition(void)
{
uint uVar1;
CBaseEntity *this;
char cVar2;
int iVar3;
undefined *puVar4;
int *in_stack_00000004;
CBasePlayer *in_stack_00000008;
CBasePlayer *this_00;
cVar2 = CDirector::IsFinaleEscapeInProgress(TheDirector);
if ((cVar2 != '\0') && (g_bIsVisibleCallLock == '\0')) {
uVar1 = *(uint *)(in_stack_00000008 + 0x2088);
if ((uVar1 != 0xffffffff) &&
(((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
(this = *(CBaseEntity **)(puVar4 + 4), this != (CBaseEntity *)0x0)))) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this);
}
*in_stack_00000004 = *(int *)(this + 0x2e0);
in_stack_00000004[1] = *(int *)(this + 0x2e4);
in_stack_00000004[2] = *(int *)(this + 0x2e8);
return in_stack_00000004;
}
}
this_00 = in_stack_00000008;
iVar3 = (**(code **)(*(int *)in_stack_00000008 + 0x500))();
if (iVar3 == 0) {
CBaseEntity::EyePosition();
}
else {
if (*(int *)(in_stack_00000008 + 0x2104) != *(int *)(gpGlobals + 4)) {
CacheVehicleView(this_00);
}
*in_stack_00000004 = *(int *)(in_stack_00000008 + 0x20e8);
in_stack_00000004[1] = *(int *)(in_stack_00000008 + 0x20ec);
in_stack_00000004[2] = *(int *)(in_stack_00000008 + 0x20f0);
}
return in_stack_00000004;
}
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.