Boomer::Spawn
0x00a64870 · 368 bytes · __thiscall
_ZN6Boomer5SpawnEv
Decompiled
undefined (1 param)
/* Boomer::Spawn() */
void __thiscall Boomer::Spawn(Boomer *this)
{
CBaseEdict *this_00;
int *piVar1;
int iVar2;
longdouble lVar3;
g_ZombieClass = 2;
piVar1 = (int *)(**(code **)(*(int *)this + 0x9b4))(this);
(**(code **)(*piVar1 + 0x10c))(piVar1,2);
iVar2 = RandomInt(1,100);
if (((float)iVar2 < *(float *)(BoomerLeakerChance._28_4_ + 0x2c) ||
(float)iVar2 == *(float *)(BoomerLeakerChance._28_4_ + 0x2c)) &&
(*(int *)(this + 0x4018) != 1)) {
if (this[0x6c] == (Boomer)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar2 + 2) = 0;
}
*(undefined4 *)(this + 0x4018) = 1;
}
else {
this[0x70] = (Boomer)((byte)this[0x70] | 1);
*(undefined4 *)(this + 0x4018) = 1;
}
}
BossZombiePlayerBot::Spawn((BossZombiePlayerBot *)this);
lVar3 = (longdouble)CountdownTimer::Now();
if ((float)lVar3 + 0.1 != *(float *)(this + 0x432c)) {
(**(code **)(*(int *)(this + 0x4324) + 4))(this + 0x4324,this + 0x432c);
*(float *)(this + 0x432c) = (float)lVar3 + 0.1;
}
if (*(float *)(this + 0x4328) != 0.1) {
(**(code **)(*(int *)(this + 0x4324) + 4))(this + 0x4324,this + 0x4328);
*(undefined4 *)(this + 0x4328) = 0x3dcccccd;
}
lVar3 = (longdouble)RandomFloat(0x40000000,0x40400000);
CTerrorPlayer::Vocalize((CTerrorPlayer *)this,"BoomerZombie.Groan",(float)lVar3,0.0);
return;
}
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.