ZombieDeath::operator()
0x00970580 · 453 bytes · __thiscall
_ZN11ZombieDeathclEP11CBasePlayer
Decompiled
undefined (2 params)
/* ZombieDeath::TEMPNAMEPLACEHOLDERVALUE(CBasePlayer*) */
undefined4 __thiscall ZombieDeath::operator()(ZombieDeath *this,CBasePlayer *param_1)
{
CBaseEntity *pCVar1;
bool bVar2;
char cVar3;
int iVar4;
longdouble lVar5;
float local_18;
float local_14;
float local_10;
cVar3 = (**(code **)(*(int *)param_1 + 300))(param_1);
if (cVar3 != '\0') {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if (iVar4 == 2) {
pCVar1 = *(CBaseEntity **)this;
if (((byte)pCVar1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar1);
}
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
local_18 = *(float *)(param_1 + 0x2e0) - *(float *)(pCVar1 + 0x2e0);
local_14 = *(float *)(param_1 + 0x2e4) - *(float *)(pCVar1 + 0x2e4);
local_10 = *(float *)(param_1 + 0x2e8) - *(float *)(pCVar1 + 0x2e8);
lVar5 = (longdouble)VectorNormalize((Vector *)&local_18);
bVar2 = 1 < *(int *)(this + 4) - 7U;
if (*(float *)(IntensityEnemyDeathNearRange._28_4_ + 0x2c) <= (float)lVar5) {
if ((float)lVar5 < *(float *)(IntensityEnemyDeathFarRange._28_4_ + 0x2c)) {
if (bVar2) {
LAB_009706a8:
Intensity::Increase((Intensity *)(param_1 + 12000),1);
return 1;
}
Intensity::Increase((Intensity *)(param_1 + 12000),3);
}
}
else {
if (bVar2) {
if (*(int *)(this + 4) == 0) {
pCVar1 = *(CBaseEntity **)this;
if (((byte)pCVar1[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(pCVar1);
}
if (*(float *)(pCVar1 + 0x274) * *(float *)(pCVar1 + 0x274) +
*(float *)(pCVar1 + 0x27c) * *(float *)(pCVar1 + 0x27c) +
*(float *)(pCVar1 + 0x278) * *(float *)(pCVar1 + 0x278) <= 22500.0)
goto LAB_009706a8;
}
Intensity::Increase((Intensity *)(param_1 + 12000),2);
return 1;
}
Intensity::Increase((Intensity *)(param_1 + 12000),4);
}
}
}
return 1;
}
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.