ZombieManager::SpawnTank
0x00a5abf0 · 306 bytes · __thiscall
_ZN13ZombieManager9SpawnTankERK6VectorRK6QAngle
Decompiled
undefined (3 params)
/* ZombieManager::SpawnTank(Vector const&, QAngle const&) */
Tank * __thiscall ZombieManager::SpawnTank(ZombieManager *this,Vector *param_1,QAngle *param_2)
{
undefined4 uVar1;
int iVar2;
Tank *this_00;
iVar2 = CDirector::GetTankLimit(TheDirector);
if ((iVar2 < 0) || (*(int *)(TheDirector + 0x1c0) < iVar2)) {
this_00 = NextBotCreatePlayerBot<Tank>("Tank");
if (this_00 != (Tank *)0x0) {
(**(code **)(*(int *)this_00 + 0x8cc))(this_00,3,8,1);
CCSPlayer::State_Transition((CCSPlayer *)this_00,0);
CBaseEntity::SetAbsOrigin((CBaseEntity *)this_00,param_1);
CBaseEntity::SetAbsAngles((CBaseEntity *)this_00,param_2);
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);
uVar1 = *(undefined4 *)(this_00 + 0x2e8);
this[0x288] = (ZombieManager)0x1;
*(undefined4 *)(this + 0x284) = uVar1;
(**(code **)(*(int *)this_00 + 100))(this_00);
this[0x288] = (ZombieManager)0x0;
CL4DGameStats::Event_SpawnZombie((CL4DGameStats *)CL4D_GameStats,8,1);
*(undefined4 *)(TheDirector + 0x118) = 0;
return this_00;
}
}
return (Tank *)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.