CDirector::GetZombieAttackDamage
0x00874880 · 195 bytes · __thiscall
_ZNK9CDirector21GetZombieAttackDamageEP13CTerrorPlayer
Decompiled
undefined (2 params)
/* CDirector::GetZombieAttackDamage(CTerrorPlayer*) const */
longdouble __thiscall CDirector::GetZombieAttackDamage(CDirector *this,CTerrorPlayer *param_1)
{
char cVar1;
int iVar2;
float fVar3;
float local_10 [2];
if (param_1 != (CTerrorPlayer *)0x0) {
cVar1 = (**(code **)(*(int *)param_1 + 0x7e8))(param_1);
if (cVar1 != '\0') {
return (longdouble)*(float *)(z_attack_incapacitated_damage._28_4_ + 0x2c);
}
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if ((iVar2 == 3) && (cVar1 = (**(code **)(*(int *)param_1 + 0x550))(param_1), cVar1 != '\0')) {
fVar3 = *(float *)(z_attack_pz_it_damage._28_4_ + 0x2c);
goto LAB_0087490f;
}
}
local_10[0] = 1.0;
CDirectorChallengeMode::GetBaseCommonAttackDamage
(*(CDirectorChallengeMode **)(this + 0x648),local_10);
fVar3 = local_10[0];
iVar2 = GetDifficulty();
if (iVar2 == 2) {
fVar3 = fVar3 * 5.0;
}
else if (iVar2 == 3) {
fVar3 = fVar3 * 20.0;
}
else if (iVar2 == 1) {
fVar3 = fVar3 + fVar3;
}
if (fVar3 <= 1.0) {
fVar3 = 1.0;
}
LAB_0087490f:
return (longdouble)fVar3;
}
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.