ZombieManager::FindValidSpawnPosition
0x00a58cb0 · 211 bytes · __thiscall
_ZN13ZombieManager22FindValidSpawnPositionEPK13TerrorNavAreaiP6Vectorb
Decompiled
undefined (5 params)
/* ZombieManager::FindValidSpawnPosition(TerrorNavArea const*, int, Vector*, bool) */
undefined4 __thiscall
ZombieManager::FindValidSpawnPosition
(ZombieManager *this,TerrorNavArea *param_1,int param_2,Vector *param_3,bool param_4)
{
undefined4 uVar1;
int iVar2;
undefined4 local_34;
undefined4 local_30;
float local_2c;
undefined4 local_28;
undefined4 local_24;
float local_20;
iVar2 = 0;
if (0 < param_2) {
do {
if ((iVar2 == 0) && (param_4)) {
local_34 = *(undefined4 *)(param_1 + 0x2c);
local_30 = *(undefined4 *)(param_1 + 0x30);
local_2c = *(float *)(param_1 + 0x34) + 10.0;
}
else {
TerrorNavArea::FindRandomSpot();
local_34 = local_28;
local_30 = local_24;
local_2c = local_20;
}
uVar1 = EntityPlacementTest((CBaseEntity *)0x0,(Vector *)&local_34,param_3,false,0x202420b,
(ITraceFilter *)0x0,0.03125);
if ((char)uVar1 != '\0') {
return uVar1;
}
iVar2 = iVar2 + 1;
} while (iVar2 != param_2);
}
return 0;
}
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.