Merge remote branch 'origin/master' into samual/hagar_secondary_autorelease
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hagar.qc
index 080eea39e453fe7ed7a7704bc1d6d8aae3321e45..147613afb304f1774c564934a9769e7f0eb563cb 100644 (file)
@@ -230,9 +230,12 @@ void W_Hagar_Attack2_Load (void)
                                        W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo, autocvar_g_balance_hagar_reload_ammo);
                                        self.weaponentity.state = WS_INUSE;
                                        self.hagar_load += 1;
-                                       sound(self, CH_WEAPON_B, "weapons/hagar_load.wav", VOL_BASE, ATTN_NORM);
+                                       sound(self, CH_WEAPON_B, "weapons/hagar_load.wav", VOL_BASE * 0.8, ATTN_NORM); // sound is too loud according to most
 
-                                       self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed * W_WeaponRateFactor();
+                                       if (self.hagar_load >= autocvar_g_balance_hagar_secondary_load_max)
+                                               self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_hold * W_WeaponRateFactor();
+                                       else
+                                               self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed * W_WeaponRateFactor();
                                }
                        }
                        else if(!self.hagar_loadbeep && self.hagar_load) // prevents the beep from playing each frame
@@ -251,7 +254,7 @@ void W_Hagar_Attack2_Load (void)
 
        if(self.hagar_load)
        {
-               if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && !autocvar_g_balance_hagar_secondary_load_hold))
+               if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && autocvar_g_balance_hagar_secondary_load_hold >= 0))
                {
                        self.weaponentity.state = WS_READY;
                        W_Hagar_Attack2_Load_Release();