SurvivorAttack::IsHindrance
0x00918580 · 420 bytes · __cdecl
_ZNK14SurvivorAttack11IsHindranceEPK8INextBotP11CBaseEntity
Decompiled
undefined (2 params)
/* SurvivorAttack::IsHindrance(INextBot const*, CBaseEntity*) const */
undefined4 SurvivorAttack::IsHindrance(INextBot *param_1,CBaseEntity *param_2)
{
uint *puVar1;
uint uVar2;
char cVar3;
int *piVar4;
int iVar5;
undefined *puVar6;
CBaseEntity *pCVar7;
piVar4 = (int *)(**(code **)(*(int *)param_2 + 0xb4))(param_2);
iVar5 = (**(code **)(*piVar4 + 0x9a8))(piVar4);
if (0 < *(int *)(iVar5 + 0x70)) {
puVar1 = *(uint **)(iVar5 + 100);
uVar2 = *puVar1;
if (((((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) &&
((piVar4 = *(int **)(puVar6 + 4), piVar4 != (int *)0x0 &&
(cVar3 = (**(code **)(*piVar4 + 300))(piVar4), cVar3 != '\0')))) &&
(0.0 < (float)puVar1[6])) {
uVar2 = *puVar1;
pCVar7 = (CBaseEntity *)0x0;
if ((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) {
if (*(uint *)(puVar6 + 8) == uVar2 >> 0xc) {
pCVar7 = *(CBaseEntity **)(puVar6 + 4);
}
else {
pCVar7 = (CBaseEntity *)0x0;
}
}
iVar5 = CBaseEntity::GetTeamNumber(pCVar7);
if ((iVar5 != 3) || (iVar5 = (**(code **)(*(int *)pCVar7 + 0x544))(pCVar7), iVar5 != 2)) {
uVar2 = *puVar1;
pCVar7 = (CBaseEntity *)0x0;
if ((uVar2 != 0xffffffff) &&
((puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)))) {
pCVar7 = *(CBaseEntity **)(puVar6 + 4);
}
iVar5 = CBaseEntity::GetTeamNumber(pCVar7);
if ((iVar5 != 3) || (iVar5 = (**(code **)(*(int *)pCVar7 + 0x544))(pCVar7), iVar5 != 8)) {
uVar2 = *puVar1;
pCVar7 = (CBaseEntity *)0x0;
if ((uVar2 != 0xffffffff) &&
((puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)))) {
pCVar7 = *(CBaseEntity **)(puVar6 + 4);
}
iVar5 = CBaseEntity::GetTeamNumber(pCVar7);
if (iVar5 != 3) {
return 2;
}
iVar5 = (**(code **)(*(int *)pCVar7 + 0x544))(pCVar7);
if (iVar5 != 7) {
return 2;
}
}
}
return 0;
}
}
return 2;
}
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.