CDirectorTacticalServices::GetSpecialZombiesInRange
0x008c1a40 · 350 bytes · __thiscall
_ZNK25CDirectorTacticalServices24GetSpecialZombiesInRangeEfR10CUtlVectorIf10CUtlMemoryIfiEERS0_IP13CTerrorPlayerS1_IS6_iEEP11CBaseEntity
Decompiled
undefined (5 params)
/* CDirectorTacticalServices::GetSpecialZombiesInRange(float, CUtlVector<float, CUtlMemory<float,
int> >&, CUtlVector<CTerrorPlayer*, CUtlMemory<CTerrorPlayer*, int> >&, CBaseEntity*) const */
int __thiscall
CDirectorTacticalServices::GetSpecialZombiesInRange
(CDirectorTacticalServices *this,float param_1,CUtlVector *param_2,CUtlVector *param_3,
CBaseEntity *param_4)
{
char cVar1;
int *piVar2;
int iVar3;
CBaseEntity *pCVar4;
int iVar5;
int local_34;
CBaseEntity *local_24;
float local_20 [4];
iVar5 = 0;
piVar2 = (int *)GetGlobalTeam(3);
local_34 = 0;
while( true ) {
iVar3 = (**(code **)(*piVar2 + 0x354))(piVar2);
if (iVar3 <= iVar5) break;
pCVar4 = (CBaseEntity *)(**(code **)(*piVar2 + 0x358))(piVar2,iVar5);
if (pCVar4 != (CBaseEntity *)0x0) {
cVar1 = (**(code **)(*(int *)pCVar4 + 0x16c))(pCVar4);
if (cVar1 != '\0') {
local_24 = pCVar4;
cVar1 = (**(code **)(*(int *)pCVar4 + 300))(pCVar4);
pCVar4 = local_24;
if (cVar1 != '\0') {
if (((byte)local_24[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(local_24);
}
if (((byte)param_4[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_4);
}
local_20[0] = SQRT((*(float *)(param_4 + 0x2e8) - *(float *)(pCVar4 + 0x2e8)) *
(*(float *)(param_4 + 0x2e8) - *(float *)(pCVar4 + 0x2e8)) +
(*(float *)(param_4 + 0x2e4) - *(float *)(pCVar4 + 0x2e4)) *
(*(float *)(param_4 + 0x2e4) - *(float *)(pCVar4 + 0x2e4)) +
(*(float *)(param_4 + 0x2e0) - *(float *)(pCVar4 + 0x2e0)) *
(*(float *)(param_4 + 0x2e0) - *(float *)(pCVar4 + 0x2e0)));
if (local_20[0] < param_1) {
local_34 = local_34 + 1;
CUtlVector<float,CUtlMemory<float,int>>::InsertBefore
((CUtlVector<float,CUtlMemory<float,int>> *)param_2,*(int *)(param_2 + 0xc),
local_20);
CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::InsertBefore
((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)param_3,
*(int *)(param_3 + 0xc),(CTerrorPlayer **)&local_24);
}
}
}
}
iVar5 = iVar5 + 1;
}
return local_34;
}
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.