diff --git a/source/server/defs/custom.qc b/source/server/defs/custom.qc index 3d23ee3..56ce222 100644 --- a/source/server/defs/custom.qc +++ b/source/server/defs/custom.qc @@ -74,6 +74,7 @@ float ach_tracker_spin; float global_trace_damage_multiplier; +.float has_ads_toggle; .float ads_release; .float has_doubletap_damage_buff; diff --git a/source/server/weapons/weapon_core.qc b/source/server/weapons/weapon_core.qc index eaccbad..0e6a347 100644 --- a/source/server/weapons/weapon_core.qc +++ b/source/server/weapons/weapon_core.qc @@ -1650,6 +1650,7 @@ void () Impulse_Functions = break; case 26: self.ads_release = !self.ads_release; + self.has_ads_toggle = true; break; case 33: W_PrimeBetty(); @@ -2086,6 +2087,7 @@ void() WeaponCore_AimButtonPressed = // is moving and Prone. else if (!self.ads_release) { W_AimIn(); + self.has_ads_toggle = false; } }; @@ -2218,7 +2220,7 @@ void() WeaponCore_ClientLogic = // check if the flag is set and W_AimIn() if (self.ads_release) W_AimIn(); - else + else if (self.has_ads_toggle) W_AimOut(); // ADS Button Pressed