CDirectorItemManager::SortItemLocationInfoByFlowDistance
0x008a3420 · 401 bytes · __cdecl
_ZN20CDirectorItemManager34SortItemLocationInfoByFlowDistanceEPK18EntityLocationInfoI7CHandleI11CBaseEntityEES6_
Decompiled
undefined (2 params)
/* CDirectorItemManager::SortItemLocationInfoByFlowDistance(EntityLocationInfo<CHandle<CBaseEntity>
> const*, EntityLocationInfo<CHandle<CBaseEntity> > const*) */
uint CDirectorItemManager::SortItemLocationInfoByFlowDistance
(EntityLocationInfo *param_1,EntityLocationInfo *param_2)
{
int iVar1;
int iVar2;
uint uVar3;
undefined *puVar4;
CBaseEntity *this;
CBaseEntity *this_00;
float fVar5;
float fVar6;
this = (CBaseEntity *)0x0;
uVar3 = *(uint *)(param_1 + 0x1c);
if (((uVar3 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar3 >> 0xc)) {
this = *(CBaseEntity **)(puVar4 + 4);
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this);
}
this_00 = (CBaseEntity *)0x0;
iVar1 = CNavMesh::GetNearestNavArea
(TheNavMesh,(Vector *)(this + 0x2e0),false,10000.0,false,true,false);
uVar3 = *(uint *)(param_2 + 0x1c);
if (((uVar3 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar3 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar4 + 4);
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
iVar2 = CNavMesh::GetNearestNavArea
(TheNavMesh,(Vector *)(this_00 + 0x2e0),false,10000.0,false,true,false);
if (iVar1 != iVar2) {
if (iVar1 == 0) {
fVar6 = -1.0;
}
else {
fVar6 = *(float *)(iVar1 + 0x154);
}
if (iVar2 == 0) {
fVar5 = -1.0;
}
else {
fVar5 = *(float *)(iVar2 + 0x154);
}
if (fVar6 < fVar5) {
uVar3 = 0xffffffff;
}
else {
uVar3 = (uint)(fVar5 < fVar6);
}
return uVar3;
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.