SurvivorIntention::IsPositionAllowed
0x0094a0f0 · 1058 bytes · __thiscall
_ZNK17SurvivorIntention17IsPositionAllowedEPK8INextBotRK6Vector
Decompiled
undefined (3 params)
/* SurvivorIntention::IsPositionAllowed(INextBot const*, Vector const&) const */
undefined4 __thiscall
SurvivorIntention::IsPositionAllowed(SurvivorIntention *this,INextBot *param_1,Vector *param_2)
{
float fVar1;
float fVar2;
float fVar3;
uint uVar4;
char cVar5;
int *piVar6;
undefined *puVar7;
int iVar8;
int iVar9;
IHandleEntity *pIVar10;
int *piVar11;
undefined4 uVar12;
longdouble lVar13;
longdouble lVar14;
longdouble lVar15;
float fVar16;
undefined **local_dc [4];
float local_cc;
float local_c8;
float local_c4;
float local_bc;
float local_b8;
float local_b4;
undefined4 local_ac;
undefined4 local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
undefined1 local_70 [44];
float local_44;
char local_3a;
char local_39;
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xc0))(param_1);
cVar5 = (**(code **)(*piVar6 + 0xd4))(piVar6);
if (cVar5 != '\0') {
return 1;
}
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
if ((((piVar6 != (int *)0x0) && (cVar5 = (**(code **)(*piVar6 + 0x16c))(piVar6), cVar5 != '\0'))
&& (uVar4 = piVar6[0xfb8], uVar4 != 0xffffffff)) &&
(((puVar7 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc &&
(*(uint *)(puVar7 + 8) == uVar4 >> 0xc)) && (*(int *)(puVar7 + 4) != 0)))) {
return 1;
}
piVar6 = (int *)(**(code **)(*(int *)param_1 + 200))(param_1);
piVar6 = (int *)(**(code **)(*piVar6 + 200))(piVar6,param_1);
if (((piVar6 != (int *)0x0) && (cVar5 = (**(code **)(*piVar6 + 0x44))(piVar6), cVar5 != '\0')) &&
(iVar8 = (**(code **)(*piVar6 + 0x24))(piVar6), iVar8 != 0)) {
if (*(int *)(iVar8 + 0x18) == 1) {
return 1;
}
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xc0))(param_1);
iVar9 = (**(code **)(*piVar6 + 300))(piVar6);
fVar1 = *(float *)(iVar9 + 8);
fVar2 = *(float *)(iVar8 + 0x10);
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xc0))(param_1);
lVar13 = (longdouble)(**(code **)(*piVar6 + 0x134))(piVar6);
if ((float)lVar13 <= fVar1 - fVar2) {
return 1;
}
}
pIVar10 = (IHandleEntity *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_dc,pIVar10,8,IgnoreActorsTraceFilterFunction);
local_dc[0] = &PTR_ShouldHitEntity_00c23430;
piVar6 = (int *)(**(code **)(*(int *)param_1 + 0xc0))(param_1);
piVar11 = (int *)(**(code **)(*(int *)param_1 + 0xc4))(param_1);
lVar13 = (longdouble)(**(code **)(*piVar11 + 0x118))(piVar11);
fVar16 = (float)lVar13 * 0.4;
uVar12 = (**(code **)(*piVar11 + 0x130))(piVar11);
lVar13 = (longdouble)(**(code **)(*piVar11 + 0x11c))(piVar11);
lVar14 = (longdouble)(**(code **)(*piVar6 + 0x134))(piVar6);
fVar1 = *(float *)(param_2 + 8);
fVar2 = *(float *)param_2;
fVar3 = *(float *)(param_2 + 4);
lVar15 = (longdouble)(**(code **)(*piVar6 + 0x130))(piVar6);
local_8c = 0;
local_cc = *(float *)param_2;
local_c8 = *(float *)(param_2 + 4);
local_bc = fVar2 - local_cc;
local_b8 = fVar3 - local_c8;
local_b4 = (fVar1 - (float)lVar14) - ((float)lVar15 + *(float *)(param_2 + 8));
local_94 = (float)lVar13 * 0.5;
local_c4 = (float)lVar15 + *(float *)(param_2 + 8) + local_94;
local_ac = 0;
local_a8 = 0;
local_87 = local_b8 * local_b8 + local_bc * local_bc + local_b4 * local_b4 != 0.0;
local_88 = fVar16 * fVar16 + fVar16 * fVar16 + local_94 * local_94 < 1e-06;
local_a4 = -local_94;
local_9c = fVar16;
local_98 = fVar16;
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,uVar12,local_dc,local_70);
if (((local_44 < 1.0) || (local_3a != '\0')) || (local_39 != '\0')) {
return 1;
}
iVar8 = (**(code **)(*(int *)this + 8))(this);
while( true ) {
if (iVar8 == 0) {
return 0;
}
piVar6 = (int *)__dynamic_cast(iVar8,&INextBotEventResponder::typeinfo,
&IContextualQuery::typeinfo,0xfffffffe);
if ((piVar6 != (int *)0x0) &&
(iVar9 = (**(code **)(*piVar6 + 0x18))(piVar6,param_1,param_2), iVar9 != 2)) break;
iVar8 = (**(code **)(*(int *)this + 0xc))(this,iVar8);
}
if (iVar9 != 1) {
return 0;
}
return 1;
}
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.