ZombieManager::ReplaceTank
0x00a58910 · 496 bytes · __thiscall
_ZN13ZombieManager11ReplaceTankEP13CTerrorPlayerS1_
Decompiled
undefined (3 params)
/* ZombieManager::ReplaceTank(CTerrorPlayer*, CTerrorPlayer*) */
char __thiscall
ZombieManager::ReplaceTank(ZombieManager *this,CTerrorPlayer *param_1,CTerrorPlayer *param_2)
{
undefined4 uVar1;
undefined4 uVar2;
undefined4 uVar3;
CTerrorPlayer CVar4;
char cVar5;
int iVar6;
int iVar7;
cVar5 = (**(code **)(*(int *)param_1 + 300))(param_1);
if (cVar5 != '\0') {
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if (iVar6 == 3) {
iVar6 = (**(code **)(*(int *)param_1 + 0x544))(param_1);
if ((iVar6 == 8) && (param_2 != (CTerrorPlayer *)0x0)) {
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
CVar4 = param_1[0x1a90];
uVar1 = *(undefined4 *)(param_1 + 0x2e0);
uVar2 = *(undefined4 *)(param_1 + 0x2e4);
uVar3 = *(undefined4 *)(param_1 + 0x2e8);
iVar6 = *(int *)(param_1 + 0x100);
CTerrorPlayer::CullZombie(param_1);
this[5] = (ZombieManager)0x1;
this[0x288] = (ZombieManager)0x1;
*(undefined4 *)(this + 0x27c) = uVar1;
*(undefined4 *)(this + 0x280) = uVar2;
*(undefined4 *)(this + 0x284) = uVar3;
g_ZombieClass = 8;
CCSPlayer::State_Transition((CCSPlayer *)param_2,0);
(**(code **)(*(int *)param_2 + 100))(param_2);
this[0x288] = (ZombieManager)0x0;
if (iVar6 != *(int *)(param_2 + 0x100)) {
(**(code **)(*(int *)param_2 + 0x214))(param_2,param_2 + 0x100);
*(int *)(param_2 + 0x100) = iVar6;
}
this[5] = (ZombieManager)0x0;
if (CVar4 != (CTerrorPlayer)0x0) {
if (param_2[0x1a90] != (CTerrorPlayer)0x1) {
(**(code **)(*(int *)(param_2 + 0x1a40) + 4))(param_2 + 0x1a40,param_2 + 0x1a90);
param_2[0x1a90] = (CTerrorPlayer)0x1;
}
if (param_2[0x1a91] != (CTerrorPlayer)0x0) {
(**(code **)(*(int *)(param_2 + 0x1a40) + 4))(param_2 + 0x1a40,param_2 + 0x1a91);
param_2[0x1a91] = (CTerrorPlayer)0x0;
}
CBaseEntity::AddFlag((CBaseEntity *)param_2,2);
iVar6 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar7 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
CBaseEntity::SetCollisionBounds
((CBaseEntity *)param_2,(Vector *)(iVar7 + 0x24),(Vector *)(iVar6 + 0x30));
}
(**(code **)(*(int *)param_1 + 0x64c))(param_1,param_2);
return cVar5;
}
}
}
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.