CEnvZoom::InputZoom
0x006984d0 · 164 bytes · __cdecl
_ZN8CEnvZoom9InputZoomER11inputdata_t
Decompiled
undefined (1 param)
/* CEnvZoom::InputZoom(inputdata_t&) */
void CEnvZoom::InputZoom(inputdata_t *param_1)
{
uint uVar1;
CBaseEntity *this;
char cVar2;
CBasePlayer *this_00;
undefined *puVar3;
this_00 = (CBasePlayer *)UTIL_GetLocalPlayer();
if (this_00 != (CBasePlayer *)0x0) {
uVar1 = *(uint *)(this_00 + 0x1d84);
if ((((uVar1 != 0xffffffff) &&
(puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
((this = *(CBaseEntity **)(puVar3 + 4), this != (CBaseEntity *)0x0 &&
((*(char **)(this + 0x7c) == "env_zoom" ||
(cVar2 = CBaseEntity::ClassMatchesComplex(this,"env_zoom"), cVar2 != '\0')))))) {
CBasePlayer::ClearZoomOwner(this_00);
}
CBasePlayer::SetFOV(this_00,(CBaseEntity *)param_1,*(int *)(param_1 + 0x444),
*(float *)(param_1 + 0x440),0);
return;
}
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.