View Single Post
Author Message
Vancold
Member
Join Date: Jan 2015
Old 01-11-2021 , 11:47   [TFC] Hamsandwich hook - Ham_Weapon_PrimaryAttack
Reply With Quote #1

Hey guys;

Why is it that when i hook Ham_Weapon_PrimaryAttack that i gets called each frame?
According to the source code the primary attack should ONLY trigger once the weapon is inattack AND the cooldown is waited out.
So why would it trigger?

The hook is done in TFC
RegisterHam(Ham_Weapon_PrimaryAttack,"tf_weap on_rpg,"myFunc")

that function would ge called way too many times.
Is the function memory location bugged or am i misunderstanding something?


Have a nice day ;)
Vancold is offline