]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_nix.qc
Rename nex to vortex
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_nix.qc
index 44ff71749cca4355a2ef8f44a30baa5f1cf41aeb..4aa7e44d5b2356a60bf2c06ae6742dffe3236f62 100644 (file)
@@ -17,16 +17,16 @@ float NIX_CanChooseWeapon(float wpn)
                return FALSE;
        if(g_weaponarena)
        {
-               if not(WEPSET_CONTAINS_AW(g_weaponarena_weapons, wpn))
+               if(!(g_weaponarena_weapons & WepSet_FromWeapon(wpn)))
                        return FALSE;
        }
        else
        {
-               if(wpn == WEP_LASER && g_nix_with_laser)
+               if(wpn == WEP_BLASTER && g_nix_with_laser) // WEAPONTODO: rename to g_nix_with_blaster
                        return FALSE;
                if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
                        return FALSE;
-               if not(e.spawnflags & WEP_FLAG_NORMAL)
+               if (!(e.spawnflags & WEP_FLAG_NORMAL))
                        return FALSE;
        }
        return TRUE;
@@ -104,14 +104,14 @@ void NIX_GiveCurrentWeapon()
                entity e;
                e = get_weaponinfo(nix_weapon);
                if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
-                       self.(weapon_load[nix_weapon]) = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));
+                       self.(weapon_load[nix_weapon]) = e.reloading_ammo;
 
                // nex too
-               if(WEP_CVAR(nex, charge))
+               if(WEP_CVAR(vortex, charge))
                {
-                       if(WEP_CVAR_SEC(nex, chargepool))
-                               self.nex_chargepool_ammo = 1;
-                       self.nex_charge = WEP_CVAR(nex, charge_start);
+                       if(WEP_CVAR_SEC(vortex, chargepool))
+                               self.vortex_chargepool_ammo = 1;
+                       self.vortex_charge = WEP_CVAR(vortex, charge_start);
                }
        }
        if(self.nix_lastinfotime != dt)
@@ -136,10 +136,10 @@ void NIX_GiveCurrentWeapon()
                self.nix_nextincr = time + autocvar_g_balance_nix_incrtime;
        }
 
-       WEPSET_CLEAR_E(self);
+       self.weapons = '0 0 0';
        if(g_nix_with_laser)
-               WEPSET_ANDNOT_EW(self, WEP_LASER);
-       WEPSET_OR_EW(self, nix_weapon);
+               self.weapons &= ~WEPSET_BLASTER;
+       self.weapons |= WepSet_FromWeapon(nix_weapon);
 
        if(self.switchweapon != nix_weapon)
                if(!client_hasweapon(self, self.switchweapon, TRUE, FALSE))
@@ -263,7 +263,7 @@ MUTATOR_DEFINITION(mutator_nix)
                        e.ammo_nails = start_ammo_nails;
                        e.ammo_rockets = start_ammo_rockets;
                        e.ammo_fuel = start_ammo_fuel;
-                       WEPSET_COPY_EA(e, start_weapons);
+                       e.weapons = start_weapons;
                        if(!client_hasweapon(e, e.weapon, TRUE, FALSE))
                                e.switchweapon = w_getbestweapon(self);
                }