CTerrorMeleeWeapon::SecondaryAttack
0x00568fc0 · 317 bytes · __thiscall
_ZN18CTerrorMeleeWeapon15SecondaryAttackEv
Decompiled
undefined (1 param)
/* CTerrorMeleeWeapon::SecondaryAttack() */
void __thiscall CTerrorMeleeWeapon::SecondaryAttack(CTerrorMeleeWeapon *this)
{
uint uVar1;
code *pcVar2;
char cVar3;
int *piVar4;
CMeleeWeaponInfo *pCVar5;
undefined4 uVar6;
undefined *puVar7;
piVar4 = (int *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
if ((((piVar4 != (int *)0x0) && (cVar3 = (**(code **)(*(int *)this + 0x680))(this), cVar3 != '\0')
) && ((uVar1 = piVar4[0xcf1], uVar1 == 0xffffffff ||
(((puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc
|| (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)))))) &&
(((cVar3 = (**(code **)(*piVar4 + 0x7e8))(piVar4), cVar3 == '\0' &&
(cVar3 = (**(code **)(*piVar4 + 0x840))(piVar4), cVar3 != '\0')) &&
((cVar3 = CTerrorWeapon::HelpingHandSecondaryAttack((CTerrorWeapon *)this), cVar3 == '\0' &&
(((cVar3 = (**(code **)(*(int *)this + 0x434))(this), cVar3 != '\0' &&
(pCVar5 = (CMeleeWeaponInfo *)
CMeleeWeaponInfoStore::GetMeleeWeaponInfo
((CMeleeWeaponInfoStore *)g_MeleeWeaponInfoStore,
*(int *)(this + 0x17e0)), pCVar5 != (CMeleeWeaponInfo *)0x0)) &&
(cVar3 = (**(code **)(*piVar4 + 0x8d8))(piVar4), cVar3 != '\0')))))))) {
pcVar2 = *(code **)(*(int *)this + 0x3f0);
uVar6 = GetSecondaryAttackActivity(this,pCVar5);
(*pcVar2)(this,uVar6);
(**(code **)(*(int *)this + 0x6d4))
(this,*(undefined4 *)(ZombieGunSwingInterval._28_4_ + 0x2c),
*(undefined4 *)(ZombieGunSwingDuration._28_4_ + 0x2c),
*(undefined4 *)(ZombieGunRange._28_4_ + 0x2c));
}
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.