]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Purge .weapons field
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index ea1f2aee811d71824e44382a18919dfe429a8d99..efefed1dc74f2451892ea7a184cf446f55d75511 100644 (file)
@@ -80,20 +80,20 @@ void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity we
                        }
 
                        if(warmup_stage)
-                               GiveFrags_randomweapons.weapons = WARMUP_START_WEAPONS;
+                               STAT(WEAPONS, GiveFrags_randomweapons) = WARMUP_START_WEAPONS;
                        else
-                               GiveFrags_randomweapons.weapons = start_weapons;
+                               STAT(WEAPONS, GiveFrags_randomweapons) = start_weapons;
 
                        // all others (including the culprit): remove
-                       GiveFrags_randomweapons.weapons &= ~STAT(WEAPONS, attacker);
-                       GiveFrags_randomweapons.weapons &= ~(culprit.m_wepset);
+                       STAT(WEAPONS, GiveFrags_randomweapons) &= ~STAT(WEAPONS, attacker);
+                       STAT(WEAPONS, GiveFrags_randomweapons) &= ~(culprit.m_wepset);
 
                        // among the remaining ones, choose one by random
-                       W_RandomWeapons(GiveFrags_randomweapons, 1);
+                       STAT(WEAPONS, GiveFrags_randomweapons) = W_RandomWeapons(GiveFrags_randomweapons, STAT(WEAPONS, GiveFrags_randomweapons), 1);
 
-                       if(GiveFrags_randomweapons.weapons)
+                       if(STAT(WEAPONS, GiveFrags_randomweapons))
                        {
-                               STAT(WEAPONS, attacker) |= GiveFrags_randomweapons.weapons;
+                               STAT(WEAPONS, attacker) |= STAT(WEAPONS, GiveFrags_randomweapons);
                                STAT(WEAPONS, attacker) &= ~(culprit.m_wepset);
                        }
                }