SurvivorAttack::ShouldHurry
0x00918750 · 597 bytes · __thiscall
_ZNK14SurvivorAttack11ShouldHurryEPK8INextBot
Decompiled
undefined (2 params)
/* SurvivorAttack::ShouldHurry(INextBot const*) const */
undefined4 __thiscall SurvivorAttack::ShouldHurry(SurvivorAttack *this,INextBot *param_1)
{
uint *puVar1;
uint uVar2;
char cVar3;
int *piVar4;
int iVar5;
undefined *puVar6;
CBaseEntity *pCVar7;
piVar4 = (int *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
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;
}
uVar2 = *puVar1;
piVar4 = (int *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
piVar4 = *(int **)(puVar6 + 4);
}
iVar5 = (**(code **)(*piVar4 + 0x14c))(piVar4);
if (iVar5 == 0) {
return 2;
}
uVar2 = *puVar1;
piVar4 = (int *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
piVar4 = *(int **)(puVar6 + 4);
}
piVar4 = (int *)(**(code **)(*piVar4 + 0x14c))(piVar4);
piVar4 = (int *)(**(code **)(*piVar4 + 0x594))(piVar4);
cVar3 = (**(code **)(*piVar4 + 0x114))(piVar4,2);
if (cVar3 == '\0') {
return 2;
}
return 1;
}
}
return 1;
}
}
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.