Quote:
Originally Posted by KliPPy
What would probably be the best thing to do is to hook bool CBasePlayerWeapon::HasSecondaryAttack() and to return true from it. You can hook it with Orpheu, Okapi or ReAPI.
|
He could try to hook
ItemPostFrame with hamsandwich and add IN_ATTACK2 to pev_button. Tho this could mess up things, I'm not sure if it's a good ideea.
But yeah, hooking
HasSecondaryAttack and altering the return value is by far the best and safest way in case the function is not copied by the compiler where it's used. It's called only from ItemPostFrame, and from what I saw while working with similar functions, some times the compiler just copy/paste the function, so hooking it does nothing, because the original function is never called. If this is the case, then hooking ItemPostFrame and handling that function at a plugin level(redoing the code) would be the solution.
__________________