CTeamplayRules::ShouldAutoAim
0x004d1440 · 222 bytes · __thiscall
_ZN14CTeamplayRules13ShouldAutoAimEP11CBasePlayerP7edict_t
Decompiled
undefined (3 params)
/* CTeamplayRules::ShouldAutoAim(CBasePlayer*, edict_t*) */
undefined4 __thiscall
CTeamplayRules::ShouldAutoAim(CTeamplayRules *this,CBasePlayer *param_1,edict_t *param_2)
{
uint uVar1;
char cVar2;
int *piVar3;
undefined4 uVar4;
int iVar5;
undefined *puVar6;
if (((param_2 == (edict_t *)0x0) &&
((param_2 = *(edict_t **)(gpGlobals + 0x58), param_2 == (edict_t *)0x0 ||
(((byte)*param_2 & 2) != 0)))) ||
((piVar3 = *(int **)(param_2 + 0xc), piVar3 == (int *)0x0 ||
((piVar3 = (int *)(**(code **)(*piVar3 + 0x18))(piVar3), piVar3 == (int *)0x0 ||
(uVar4 = (**(code **)(*piVar3 + 0x16c))(piVar3), (char)uVar4 == '\0')))))) {
uVar4 = 1;
}
else {
iVar5 = (**(code **)(*(int *)this + 0x1a4))(this,param_1,piVar3);
if (iVar5 == 1) {
cVar2 = (**(code **)(*piVar3 + 0x16c))(piVar3);
if ((((cVar2 == '\0') || (uVar1 = piVar3[0xfb8], uVar1 == 0xffffffff)) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
return 0;
}
if (*(int *)(puVar6 + 4) == 0) {
uVar4 = 0;
}
}
}
return uVar4;
}
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.