]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't pick specific weapons
authorterencehill <piuntn@gmail.com>
Wed, 20 Apr 2016 17:12:10 +0000 (19:12 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 20 Apr 2016 17:21:47 +0000 (19:21 +0200)
qcsrc/client/hud/panel/weapons.qc

index 52fcc549aac908f7ee336b2bfaad6229a7d316a4..8fa22dd5e8afbce4d43f6d29c7740b6915b1e553 100644 (file)
@@ -106,12 +106,14 @@ void HUD_Weapons()
        {
                if(!weapons_stat)
                {
-                       weapons_stat |= WepSet_FromWeapon(Weapons_from(WEP_BLASTER.m_id));
-                       weapons_stat |= WepSet_FromWeapon(Weapons_from(WEP_SHOTGUN.m_id));
-                       weapons_stat |= WepSet_FromWeapon(Weapons_from(WEP_MORTAR.m_id));
-                       weapons_stat |= WepSet_FromWeapon(Weapons_from(WEP_CRYLINK.m_id));
-                       weapons_stat |= WepSet_FromWeapon(Weapons_from(WEP_VORTEX.m_id));
-                       weapons_stat |= WepSet_FromWeapon(Weapons_from(WEP_DEVASTATOR.m_id));
+                       int j = 0;
+                       FOREACH(Weapons, it != WEP_Null && it.impulse >= 0 && (it.impulse % 3 != 0) && j < 6, {
+                               if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+                               {
+                                       weapons_stat |= it.m_wepset;
+                                       ++j;
+                               }
+                       });
                }
 
                #if 0