]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_hagar.qc
Get rid of if not, step 1.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hagar.qc
index 0be6ea527e4e20f125eed0586c54b094e092b8db..e32af7de58b09ffbf83aeea7ad5d99a9dc46659c 100644 (file)
@@ -269,7 +269,7 @@ void W_Hagar_Attack2_Load (void)
                                self.weaponentity.state = WS_READY;
                                W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo * self.hagar_load * -1, autocvar_g_balance_hagar_reload_ammo); // give back ammo
                                self.hagar_load = 0;
-                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTEN_NORM);
 
                                // pause until we can load rockets again, once we re-press the alt fire button
                                self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed * W_WeaponRateFactor();
@@ -288,7 +288,7 @@ 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 * 0.8, ATTN_NORM); // sound is too loud according to most
+                                       sound(self, CH_WEAPON_B, "weapons/hagar_load.wav", VOL_BASE * 0.8, ATTEN_NORM); // sound is too loud according to most
 
                                        if (self.hagar_load >= autocvar_g_balance_hagar_secondary_load_max)
                                                self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_hold * W_WeaponRateFactor();
@@ -299,7 +299,7 @@ void W_Hagar_Attack2_Load (void)
                        else if(!self.hagar_loadbeep && self.hagar_load) // prevents the beep from playing each frame
                        {
                                // if this is the last rocket we can load, play a beep sound to notify the player
-                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTEN_NORM);
                                self.hagar_loadbeep = TRUE;
                        }
                }
@@ -318,7 +318,7 @@ void W_Hagar_Attack2_Load (void)
                        if(!self.hagar_warning && self.hagar_load) // prevents the beep from playing each frame
                        {
                                // we're about to automatically release after holding time, play a beep sound to notify the player
-                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTEN_NORM);
                                self.hagar_warning = TRUE;
                        }
                }
@@ -337,7 +337,7 @@ void W_Hagar_Attack2_Load (void)
        }
 
        // we aren't checking ammo during an attack, so we must do it here
-       if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
+       if (!(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2)))
        {
                // note: this doesn't force the switch
                W_SwitchToOtherWeapon(self);
@@ -442,7 +442,7 @@ float w_hagar(float req)
        }
        else if (req == WR_RELOAD)
        {
-               if not(self.hagar_load) // require releasing loaded rockets first
+               if (!self.hagar_load) // require releasing loaded rockets first
                        W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
        }
        else if (req == WR_SUICIDEMESSAGE)
@@ -470,11 +470,11 @@ float w_hagar(float req)
                if(!w_issilent)
                {
                        if (w_random<0.15)
-                               sound(self, CH_SHOTS, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, "weapons/hagexp1.wav", VOL_BASE, ATTEN_NORM);
                        else if (w_random<0.7)
-                               sound(self, CH_SHOTS, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, "weapons/hagexp2.wav", VOL_BASE, ATTEN_NORM);
                        else
-                               sound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTEN_NORM);
                }
        }
        else if(req == WR_PRECACHE)