]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
stuff
authorRudolf Polzer <divverent@alientrap.org>
Sun, 4 Mar 2012 15:30:45 +0000 (16:30 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 4 Mar 2012 15:30:45 +0000 (16:30 +0100)
qcsrc/server/cl_client.qc
qcsrc/server/g_damage.qc
qcsrc/server/mutators/mutator_nix.qc
qcsrc/server/w_porto.qc

index 2c89b3e3e9622c3fdf44b765f5f70a8428ca4e9c..18922fea776ae144ad23dcdf50ded97e18be6241 100644 (file)
@@ -757,10 +757,10 @@ void PutClientInServer (void)
                if(g_weaponarena_random)
                {
                        if(g_weaponarena_random_with_laser)
-                               WEPSET_ANDNOT_EW(self, WEPBIT_LASER);
+                               WEPSET_ANDNOT_EW(self, WEP_LASER);
                        self.weapons = randombits(self.weapons, g_weaponarena_random, FALSE);
                        if(g_weaponarena_random_with_laser)
-                               WEPSET_OR_EW(self, WEPBIT_LASER);
+                               WEPSET_OR_EW(self, WEP_LASER);
                }
 
                self.items = start_items;
index ab9096c45a0cf6bb62c22314de18ca37b366fb3d..5d086820e24cde732d54f8876845c67e78fa27bb 100644 (file)
@@ -144,26 +144,27 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                if(!culprit || !WEPSET_CONTAINS_EW(attacker, culprit))
                        culprit = attacker.weapon;
 
-               if(g_weaponarena_random_with_laser && culprit == WEPBIT_LASER)
+               if(g_weaponarena_random_with_laser && culprit == WEP_LASER)
                {
                        // no exchange
                }
                else
                {
                        if(inWarmupStage)
-                               w = warmup_start_weapons;
+                               WEPSET_COPY_AA(w, warmup_start_weapons);
                        else
-                               w = start_weapons;
+                               WEPSET_COPY_AA(w, start_weapons);
 
                        // all others (including the culprit): remove
-                       w &~= attacker.weapons;
+                       WEPSET_ANDNOT_AE(w, attacker);
+                       WEPSET_ANDNOT_AW(w, culprit);
 
                        // among the remaining ones, choose one by random
                        w = randombits(w, 1, FALSE);
                        if(w)
                        {
-                               attacker.weapons |= w;
-                               attacker.weapons &~= get_weaponinfo(culprit).weapons;
+                               WEPSET_OR_EA(attacker, w);
+                               WEPSET_ANDNOT_EW(attacker, culprit);
                        }
                }
 
index 2e5e425eb815ab316690088e63383f0e0fdcfcd8..dc90336caf377e0277b267aa4930bc66f44f7eae 100644 (file)
@@ -143,7 +143,7 @@ void NIX_GiveCurrentWeapon()
 
        self.weapons = 0;
        if(g_nix_with_laser)
-               self.weapons = self.weapons | WEPBIT_LASER;
+               WEPSET_ANDNOT_EW(self, WEP_LASER);
        WEPSET_OR_EW(self, nix_weapon);
 
        if(self.switchweapon != nix_weapon)
index c919c497e661f7a098eb44199efa7cdfdb6c6c26..024db232ba811bd9633afb85bf3b7f87d37d5a6e 100644 (file)
@@ -36,7 +36,7 @@ void W_Porto_Fail (float failhard)
 
        self.realowner.porto_current = world;
 
-       if(self.cnt < 0 && !failhard && self.realowner.playerid == self.playerid && self.realowner.deadflag == DEAD_NO && !(self.realowner.weapons & WEPBIT_PORTO))
+       if(self.cnt < 0 && !failhard && self.realowner.playerid == self.playerid && self.realowner.deadflag == DEAD_NO && !WEPSET_CONTAINS_EW(self.realowner, WEPBIT_PORTO))
        {
                setsize (self, '-16 -16 0', '16 16 32');
                setorigin(self, self.origin + trace_plane_normal);
@@ -202,12 +202,6 @@ void W_Porto_Attack (float type)
 {
        entity gren;
 
-       if(type == -1)
-       {
-               if not(self.items & IT_UNLIMITED_SUPERWEAPONS)
-                       self.weapons = self.weapons - (self.weapons & WEPBIT_PORTO);
-       }
-
        W_SetupShot (self, FALSE, 4, "porto/fire.wav", CH_WEAPON_A, 0);
        // always shoot from the eye
        w_shotdir = v_forward;