Raised This Month: $ Target: $400
 0% 

Solved [HELP] Remove Rate of Fire Modifier on AUG/SG552


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-22-2019 , 09:57   Re: [HELP] Remove Rate of Fire Modifier on AUG/SG552
Reply With Quote #7

Here it is how it works(looking at AUG):
1.CAUG::SecondaryAttack is called when right click is pressed and it changes the FOV to simulate zooming.
2.Inside CAUG:: PrimaryAttack FOV is checked and AUGFire is called with different values depending on zoom status(zoomed in/out): 0.135 when zoomed it and 0.0825 when normal. This value is passed in flCycleTime parameter.
3.Inside AUGFire: m_flNextPrimaryAttack and m_flNextSecondaryAttack are set to GetNextAttackDelay(flCycleTime) which translates(for our purpose) to flCycleTime + 0.0 = flCycleTime.
Therefore flCycleTime controls the rate of fire.

Here is what you are doing:
Ham_Weapon_PrimaryAttack pre: set m_flNextPrimaryAttack
PrimaryAttack is executed -> AUGFire is executed -> game changes m_flNextPrimaryAttack overriding your change

Long story short: hook as POST not PRE. Also your value is wrong, it should be 0.0825 for default rate of fire.
__________________

Last edited by HamletEagle; 12-22-2019 at 09:58.
HamletEagle is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode