CDirectorTacticalServices::GetZombiesInRange
0x008c1dc0 · 394 bytes · __thiscall
_ZNK25CDirectorTacticalServices17GetZombiesInRangeEfR10CUtlVectorIf10CUtlMemoryIfiEERS0_IP8InfectedS1_IS6_iEEP11CBaseEntity23CommonInfectedCountType
Decompiled
undefined (6 params)
/* CDirectorTacticalServices::GetZombiesInRange(float, CUtlVector<float, CUtlMemory<float, int> >&,
CUtlVector<Infected*, CUtlMemory<Infected*, int> >&, CBaseEntity*, CommonInfectedCountType) const
*/
int __thiscall
CDirectorTacticalServices::GetZombiesInRange
(undefined4 this,float param_1,CUtlVector<float,CUtlMemory<float,int>> *param_2,
CUtlVector<Infected*,CUtlMemory<Infected*,int>> *param_3,CBaseEntity *param_4,
undefined4 param_6)
{
code *pcVar1;
char cVar2;
int iVar3;
uint uVar4;
int iVar5;
longdouble lVar6;
int local_48;
float local_38;
undefined4 local_34;
int local_30 [8];
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
local_34 = param_6;
/* try { // try from 008c1df2 to 008c1f0d has its CatchHandler @ 008c1f54 */
iVar3 = TheNextBots();
uVar4 = (uint)*(ushort *)(iVar3 + 0x10);
if (uVar4 != 0xffff) {
iVar5 = *(int *)(iVar3 + 4);
do {
cVar2 = CommonInfectedCollector::operator()
((CommonInfectedCollector *)&local_34,*(INextBot **)(iVar5 + uVar4 * 8));
if (cVar2 == '\0') break;
iVar5 = *(int *)(iVar3 + 4);
uVar4 = (uint)*(ushort *)(iVar5 + 6 + uVar4 * 8);
} while (uVar4 != 0xffff);
}
if (local_30[3] < 1) {
local_48 = 0;
}
else {
iVar3 = 0;
local_48 = 0;
LAB_008c1e6c:
do {
iVar5 = *(int *)(local_30[0] + iVar3 * 4);
if (*(char *)(iVar5 + 0x1d09) == '\0') {
pcVar1 = *(code **)(*(int *)(iVar5 + 0x1a3c) + 0x128);
if (((byte)param_4[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_4);
}
lVar6 = (longdouble)(*pcVar1)(iVar5 + 0x1a3c,param_4 + 0x2e0);
local_38 = (float)lVar6;
if (local_38 < param_1) {
CUtlVector<float,CUtlMemory<float,int>>::InsertBefore
(param_2,*(int *)(param_2 + 0xc),&local_38);
CUtlVector<Infected*,CUtlMemory<Infected*,int>>::InsertBefore
(param_3,*(int *)(param_3 + 0xc),(Infected **)(local_30[0] + iVar3 * 4));
local_48 = local_48 + 1;
iVar3 = iVar3 + 1;
if (local_30[3] <= iVar3) break;
goto LAB_008c1e6c;
}
}
iVar3 = iVar3 + 1;
} while (iVar3 < local_30[3]);
}
local_30[3] = 0;
CUtlMemory<Infected*,int>::Purge((CUtlMemory<Infected*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<Infected*,int>::Purge((CUtlMemory<Infected*,int> *)local_30);
return local_48;
}
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.