CTerrorPlayer::OnZombieStateAlert
0x009a2010 · 604 bytes · __thiscall
_ZN13CTerrorPlayer18OnZombieStateAlertEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::OnZombieStateAlert() */
void __thiscall CTerrorPlayer::OnZombieStateAlert(CTerrorPlayer *this)
{
char cVar1;
int iVar2;
undefined4 uVar3;
longdouble lVar4;
if (*(int *)(ZombieStateDebug._28_4_ + 0x30) != 0) {
uVar3 = (**(code **)(*(int *)this + 0xb8))(this);
DevMsg("STATE: Player %s going Alert.\n",uVar3);
}
(**(code **)(*(int *)this + 0x81c))(this);
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar2 == 3) && (iVar2 = (**(code **)(*(int *)this + 0x544))(this), iVar2 == 8)) {
cVar1 = (**(code **)(*(int *)this + 0x7e8))(this);
if ((cVar1 == '\0') && (((byte)this[0x153] & 8) == 0)) {
lVar4 = (longdouble)RandomFloat(0x40400000,0x40a00000);
Vocalize(this,"HulkZombie.Yell",(float)lVar4,0.0);
return;
}
}
else {
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar2 == 3) && (iVar2 = (**(code **)(*(int *)this + 0x544))(this), iVar2 == 1)) {
lVar4 = (longdouble)RandomFloat(0x40400000,0x40a00000);
Vocalize(this,"SmokerZombie.Recognize",(float)lVar4,0.0);
return;
}
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar2 == 3) && (iVar2 = (**(code **)(*(int *)this + 0x544))(this), iVar2 == 6)) {
lVar4 = (longdouble)RandomFloat(0x40400000,0x40a00000);
Vocalize(this,"ChargerZombie.Recognize",(float)lVar4,0.0);
return;
}
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar2 == 3) && (iVar2 = (**(code **)(*(int *)this + 0x544))(this), iVar2 == 4)) {
lVar4 = (longdouble)RandomFloat(0x40400000,0x40a00000);
Vocalize(this,"SpitterZombie.Recognize",(float)lVar4,0.0);
}
else {
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar2 == 3) && (iVar2 = (**(code **)(*(int *)this + 0x544))(this), iVar2 == 2)) {
lVar4 = (longdouble)RandomFloat(0x40400000,0x40a00000);
Vocalize(this,"BoomerZombie.Rage",(float)lVar4,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.