ZombieManager::SpawnSpecial
0x00a58f40 · 299 bytes · __thiscall
_ZN13ZombieManager12SpawnSpecialE15ZombieClassTypeRK6VectorRK6QAngle
Decompiled
undefined (4 params)
/* ZombieManager::SpawnSpecial(ZombieClassType, Vector const&, QAngle const&) */
CCSPlayer * __thiscall
ZombieManager::SpawnSpecial(ZombieManager *this,int param_2,Vector *param_3,QAngle *param_4)
{
uint uVar1;
undefined4 uVar2;
CCSPlayer *this_00;
uVar1 = param_2 - 1;
if (uVar1 < 6) {
this_00 = (CCSPlayer *)
(**(code **)(SpawnSpecial(ZombieClassType,Vector_const&,QAngle_const&)::
specialCreateFuncs + uVar1 * 8))
(*(undefined4 *)
(SpawnSpecial(ZombieClassType,Vector_const&,QAngle_const&)::
specialCreateFuncs + uVar1 * 8 + 4));
if (this_00 != (CCSPlayer *)0x0) {
(**(code **)(*(int *)this_00 + 0x8cc))(this_00,3,8,0);
CCSPlayer::State_Transition(this_00,0);
CBaseEntity::SetAbsOrigin((CBaseEntity *)this_00,param_3);
CBaseEntity::SetAbsAngles((CBaseEntity *)this_00,param_4);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this_00);
}
*(undefined4 *)(this + 0x27c) = *(undefined4 *)(this_00 + 0x2e0);
*(undefined4 *)(this + 0x280) = *(undefined4 *)(this_00 + 0x2e4);
uVar2 = *(undefined4 *)(this_00 + 0x2e8);
this[0x288] = (ZombieManager)0x1;
*(undefined4 *)(this + 0x284) = uVar2;
DispatchSpawn((CBaseEntity *)this_00,true);
this[0x288] = (ZombieManager)0x0;
CL4DGameStats::Event_SpawnZombie((CL4DGameStats *)CL4D_GameStats,param_2,1);
*(int *)(this + 0x4c) = *(int *)(this + 0x4c) + 1;
*(int *)(this + 0x68) = *(int *)(this + 0x68) + 1;
*(int *)(this + uVar1 * 4 + 0x50) = *(int *)(this + uVar1 * 4 + 0x50) + 1;
return this_00;
}
}
return (CCSPlayer *)0x0;
}
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.