CDeathFallCamera::Enable
0x00870870 · 311 bytes · __thiscall
_ZN16CDeathFallCamera6EnableEP11CBasePlayer
Decompiled
undefined (2 params)
/* CDeathFallCamera::Enable(CBasePlayer*) */
void __thiscall CDeathFallCamera::Enable(CDeathFallCamera *this,CBasePlayer *param_1)
{
int iVar1;
CBaseEntity *this_00;
undefined *puVar2;
uint uVar3;
iVar1 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)param_1);
if (iVar1 != 0) {
this_00 = (CBaseEntity *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)param_1);
CBaseEntity::AddEffects(this_00,0x20);
}
CBasePlayer::EnableControl(param_1,false);
if (param_1[0x1ac8] != (CBasePlayer)0x0) {
(**(code **)(*(int *)(param_1 + 0x1a40) + 4))(param_1 + 0x1a40,param_1 + 0x1ac8);
param_1[0x1ac8] = (CBasePlayer)0x0;
}
CBasePlayer::SetViewEntity(param_1,(CBaseEntity *)this);
uVar3 = *(uint *)(param_1 + 0x1a7c) | 0x77b;
if (*(uint *)(param_1 + 0x1a7c) != uVar3) {
(**(code **)(*(int *)(param_1 + 0x1a40) + 4))(param_1 + 0x1a40,param_1 + 0x1a7c);
*(uint *)(param_1 + 0x1a7c) = uVar3;
}
uVar3 = *(uint *)(param_1 + 0x1d84);
if ((((uVar3 != 0xffffffff) &&
(puVar2 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar2 + 8) == uVar3 >> 0xc)) &&
((*(CBasePlayer **)(puVar2 + 4) != (CBasePlayer *)0x0 &&
(param_1 != *(CBasePlayer **)(puVar2 + 4))))) {
CBasePlayer::ClearZoomOwner(param_1);
}
CBasePlayer::SetFOV(param_1,(CBaseEntity *)this,(int)*(float *)(this + 0x440),
*(float *)(this + 0x444),0);
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.