]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Merge remote-tracking branch 'origin/master' into samual/notification_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index 6832a54d9f0ee3f3334d12595e9961fbb57e043f..61bde55c7fabaa952ceeb9dccae6881c5b226b64 100644 (file)
@@ -128,7 +128,7 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                culprit = DEATH_WEAPONOF(deathtype);
                if(!culprit)
                        culprit = attacker.weapon;
-               else if(!WEPSET_CONTAINS_EW(attacker, culprit))
+               else if(!(attacker.weapons & WepSet_FromWeapon(culprit)))
                        culprit = attacker.weapon;
 
                if(g_weaponarena_random_with_laser && culprit == WEP_LASER)
@@ -144,26 +144,26 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype)
                        }
 
                        if(warmup_stage)
-                               WEPSET_COPY_EA(GiveFrags_randomweapons, warmup_start_weapons);
+                               GiveFrags_randomweapons.weapons = warmup_start_weapons;
                        else
-                               WEPSET_COPY_EA(GiveFrags_randomweapons, start_weapons);
+                               GiveFrags_randomweapons.weapons = start_weapons;
 
                        // all others (including the culprit): remove
-                       WEPSET_ANDNOT_EE(GiveFrags_randomweapons, attacker);
-                       WEPSET_ANDNOT_EW(GiveFrags_randomweapons, culprit);
+                       GiveFrags_randomweapons.weapons &= ~attacker.weapons;
+                       GiveFrags_randomweapons.weapons &= ~WepSet_FromWeapon(culprit);
 
                        // among the remaining ones, choose one by random
                        W_RandomWeapons(GiveFrags_randomweapons, 1);
 
-                       if(!WEPSET_EMPTY_E(GiveFrags_randomweapons))
+                       if(GiveFrags_randomweapons.weapons)
                        {
-                               WEPSET_OR_EE(attacker, GiveFrags_randomweapons);
-                               WEPSET_ANDNOT_EW(attacker, culprit);
+                               attacker.weapons |= GiveFrags_randomweapons.weapons;
+                               attacker.weapons &= ~WepSet_FromWeapon(culprit);
                        }
                }
 
                // after a frag, choose another random weapon set
-               if not(WEPSET_CONTAINS_EW(attacker, attacker.weapon))
+               if not(attacker.weapons & WepSet_FromWeapon(attacker.weapon))
                        W_SwitchWeapon_Force(attacker, w_getbestweapon(attacker));
        }
 
@@ -809,7 +809,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                }
                else
                        self.velocity = self.velocity + farce;
-               self.flags &~= FL_ONGROUND;
+               self.flags &= ~FL_ONGROUND;
                UpdateCSQCProjectile(self);
        }
        // apply damage
@@ -1248,7 +1248,7 @@ void Fire_ApplyEffect(entity e)
        if(Fire_IsBurning(e))
                e.effects |= EF_FLAME;
        else
-               e.effects &~= EF_FLAME;
+               e.effects &= ~EF_FLAME;
 }
 
 void fireburner_think()