CTerrorWeapon::SecondaryAttack
0x00574400 · 278 bytes · __thiscall
_ZN13CTerrorWeapon15SecondaryAttackEv
Decompiled
undefined (1 param)
/* CTerrorWeapon::SecondaryAttack() */
void __thiscall CTerrorWeapon::SecondaryAttack(CTerrorWeapon *this)
{
char cVar1;
CBasePlayer *this_00;
int iVar2;
int iVar3;
this_00 = (CBasePlayer *)GetPlayerOwner(this);
if (this_00 != (CBasePlayer *)0x0) {
cVar1 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*(int *)this_00 + 0x840))(this_00);
if (cVar1 != '\0') {
cVar1 = HelpingHandSecondaryAttack(this);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*(int *)this + 0x434))(this);
if (cVar1 != '\0') {
cVar1 = (**(code **)(*(int *)this + 0x680))(this);
if (cVar1 == '\0') {
CWeaponCSBase::SecondaryAttack((CWeaponCSBase *)this);
return;
}
iVar2 = CBasePlayer::GetFOV(this_00);
iVar3 = CBasePlayer::GetDefaultFOV(this_00);
if (iVar2 != iVar3) {
cVar1 = (**(code **)(*(int *)this + 0x628))(this);
if (cVar1 == '\0') {
iVar2 = CBasePlayer::GetDefaultFOV(this_00);
CBasePlayer::SetFOV(this_00,(CBaseEntity *)this_00,iVar2,0.0,0);
}
else {
(**(code **)(*(int *)this + 0x630))(this);
}
}
(**(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.