ZombieCounter::operator()
0x00970980 · 234 bytes · __thiscall
_ZN13ZombieCounterclEP20CBaseCombatCharacter
Decompiled
undefined (2 params)
/* ZombieCounter::TEMPNAMEPLACEHOLDERVALUE(CBaseCombatCharacter*) */
undefined4 __thiscall ZombieCounter::operator()(ZombieCounter *this,CBaseCombatCharacter *param_1)
{
uint uVar1;
char cVar2;
int iVar3;
int *piVar4;
cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1);
if ((cVar2 == '\0') && (this[0x3c] == (ZombieCounter)0x0)) {
return 1;
}
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if (iVar3 != 3) {
return 1;
}
cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar2 == '\0') {
piVar4 = (int *)__dynamic_cast(param_1,&CBaseCombatCharacter::typeinfo,&Infected::typeinfo,0);
if (piVar4 == (int *)0x0) goto LAB_009709f2;
param_1 = (CBaseCombatCharacter *)0x0;
iVar3 = (**(code **)(*piVar4 + 0x544))(piVar4);
}
else {
iVar3 = (**(code **)(*(int *)param_1 + 0x544))(param_1);
}
uVar1 = iVar3 - 1;
if (uVar1 < 6) {
*(int *)(this + uVar1 * 4 + 0xc) = *(int *)(this + uVar1 * 4 + 0xc) + 1;
cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1);
if (cVar2 == '\0') {
return 1;
}
*(int *)(this + uVar1 * 4 + 0x24) = *(int *)(this + uVar1 * 4 + 0x24) + 1;
return 1;
}
if (iVar3 == 7) {
*(int *)(this + 4) = *(int *)(this + 4) + 1;
return 1;
}
if (iVar3 == 8) {
*(int *)this = *(int *)this + 1;
return 1;
}
if (iVar3 != 0) {
return 1;
}
LAB_009709f2:
*(int *)(this + 8) = *(int *)(this + 8) + 1;
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.