ZombieBotVision::IsNoticed
0x00a57500 · 721 bytes · __thiscall
_ZNK15ZombieBotVision9IsNoticedEP11CBaseEntity
Decompiled
undefined (2 params)
/* ZombieBotVision::IsNoticed(CBaseEntity*) const */
undefined4 __thiscall ZombieBotVision::IsNoticed(ZombieBotVision *this,CBaseEntity *param_1)
{
code *pcVar1;
code *pcVar2;
undefined4 *puVar3;
char cVar4;
undefined4 uVar5;
undefined4 uVar6;
int iVar7;
int *piVar8;
float *pfVar9;
undefined4 *puVar10;
longdouble lVar11;
float fVar12;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
uVar5 = (**(code **)(*(int *)this + 0xdc))();
if ((char)uVar5 != '\0') {
return 0;
}
uVar6 = (**(code **)(*(int *)param_1 + 0x16c))();
if ((char)uVar6 == '\0') {
return 1;
}
iVar7 = CBaseEntity::GetTeamNumber(param_1);
cVar4 = IsASurvivorTeam(iVar7);
if (cVar4 == '\0') {
return uVar6;
}
if (*(int *)(NextBotIgnoreSurvivors._28_4_ + 0x30) != 0) {
return uVar5;
}
piVar8 = (int *)(**(code **)(*(int *)this + 0xb0))();
cVar4 = (**(code **)(*piVar8 + 0xf8))();
if (cVar4 == '\0') {
return uVar5;
}
cVar4 = CDirectorSessionManager::IsWaitingForTeamReady
(*(CDirectorSessionManager **)(TheDirector + 0x634));
if (cVar4 != '\0') {
return uVar5;
}
piVar8 = (int *)(**(code **)(*(int *)this + 0xb0))();
piVar8 = (int *)(**(code **)(*piVar8 + 0xc4))();
if ((piVar8 != (int *)0x0) && (cVar4 = (**(code **)(*piVar8 + 0x114))(), cVar4 == '\0')) {
return uVar6;
}
uVar5 = (**(code **)(*(int *)param_1 + 0x550))();
if ((char)uVar5 != '\0') {
return uVar6;
}
if (((byte)param_1[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(param_1);
}
fVar12 = *(float *)(param_1 + 0x278) * *(float *)(param_1 + 0x278) +
*(float *)(param_1 + 0x274) * *(float *)(param_1 + 0x274) +
*(float *)(param_1 + 0x27c) * *(float *)(param_1 + 0x27c);
if (22500.0 < fVar12) {
return uVar6;
}
iVar7 = (**(code **)(*(int *)param_1 + 0x5f4))();
puVar3 = (undefined4 *)&stack0xffffffa4;
if ((iVar7 != 0) && (puVar3 = (undefined4 *)&stack0xffffffa4, piVar8 != (int *)0x0)) {
(**(code **)(*(int *)param_1 + 0x234))();
puVar10 = (undefined4 *)&stack0xffffffa0;
pfVar9 = (float *)(**(code **)(*piVar8 + 0xb8))();
local_34 = *pfVar9 - local_28;
local_30 = pfVar9[1] - local_24;
local_2c = pfVar9[2] - local_20;
VectorNormalize((Vector *)&local_34);
CBasePlayer::EyeVectors((CBasePlayer *)param_1,(Vector *)&local_28,(Vector *)0x0,(Vector *)0x0);
puVar3 = (undefined4 *)&stack0xffffffa0;
if (0.9396 < local_24 * local_30 + local_28 * local_34 + local_20 * local_2c) goto LAB_00a576a4;
}
puVar10 = puVar3;
if (fVar12 <= 900.0) {
return uVar5;
}
puVar10[1] = 1;
*puVar10 = param_1;
puVar10[-1] = 0xa5769c;
cVar4 = CTerrorPlayer::IsStill();
if (cVar4 != '\0') {
return uVar5;
}
LAB_00a576a4:
iVar7 = *(int *)this;
*puVar10 = this;
pcVar1 = *(code **)(iVar7 + 0xb0);
puVar10[-1] = 0xa576af;
piVar8 = (int *)(*pcVar1)();
iVar7 = *(int *)this;
pcVar1 = *(code **)(*piVar8 + 0x114);
*puVar10 = this;
pcVar2 = *(code **)(iVar7 + 0x104);
puVar10[-1] = 0xa576c7;
lVar11 = (longdouble)(*pcVar2)();
*puVar10 = piVar8;
puVar10[1] = param_1;
puVar10[2] = (float)lVar11;
puVar10[-1] = 0xa576e1;
uVar5 = (*pcVar1)();
return uVar5;
}
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.