CBasePlayer::InputSetFogController
0x007aa5f0 · 324 bytes · __thiscall
_ZN11CBasePlayer21InputSetFogControllerER11inputdata_t
Decompiled
undefined (2 params)
/* CBasePlayer::InputSetFogController(inputdata_t&) */
void __thiscall CBasePlayer::InputSetFogController(CBasePlayer *this,inputdata_t *param_1)
{
uint uVar1;
char *pcVar2;
int iVar3;
int *piVar4;
undefined4 *puVar5;
undefined *puVar6;
if (*(int *)(param_1 + 0x18) == 0xd) {
uVar1 = *(uint *)(param_1 + 0x14);
if (uVar1 == 0xffffffff) {
return;
}
puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
if (puVar6 == (undefined *)0xfffffffc) {
return;
}
if (*(uint *)(puVar6 + 8) != uVar1 >> 0xc) {
return;
}
iVar3 = *(int *)(puVar6 + 4);
}
else {
if (*(int *)(param_1 + 0x18) == 2) {
pcVar2 = "";
if (*(char **)(param_1 + 8) != (char *)0x0) {
pcVar2 = *(char **)(param_1 + 8);
}
}
else {
pcVar2 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
}
iVar3 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar2,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
}
if ((iVar3 != 0) &&
(piVar4 = (int *)__dynamic_cast(iVar3,&CBaseEntity::typeinfo,&CFogController::typeinfo,0),
piVar4 != (int *)0x0)) {
uVar1 = *(uint *)(this + 0x1c14);
if ((uVar1 != 0xffffffff) &&
(((puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (piVar4 == *(int **)(puVar6 + 4))))) {
return;
}
(**(code **)(*(int *)(this + 0x1c10) + 4))(this + 0x1c10,this + 0x1c14);
puVar5 = (undefined4 *)(**(code **)(*piVar4 + 0xc))(piVar4);
*(undefined4 *)(this + 0x1c14) = *puVar5;
}
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.