]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
simplify unlimited_weapon_ammo: just set all ammo counters to 999. Way simpler...
authorRudolf Polzer <divverent@alientrap.org>
Wed, 9 Mar 2011 16:35:00 +0000 (17:35 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 9 Mar 2011 16:35:00 +0000 (17:35 +0100)
qcsrc/server/miscfunctions.qc

index 4d388068f1a6a892edd5ea8525197848ee2cae3c..4f6d9868faa4901296c86868f9740d186ad1873d 100644 (file)
@@ -1026,23 +1026,11 @@ void readplayerstartcvars()
        }
        else if(start_items & IT_UNLIMITED_WEAPON_AMMO)
        {
-               for (j = WEP_FIRST; j <= WEP_LAST; ++j)
-               {
-                       e = get_weaponinfo(j);
-                       if(start_weapons & e.weapons)
-                       {
-                               if(e.items & IT_ROCKETS)
-                                       start_ammo_rockets = 999;
-                               if(e.items & IT_SHELLS)
-                                       start_ammo_shells = 999;
-                               if(e.items & IT_CELLS)
-                                       start_ammo_cells = 999;
-                               if(e.items & IT_NAILS)
-                                       start_ammo_nails = 999;
-                               if(e.items & IT_FUEL)
-                                       start_ammo_fuel = 999;
-                       }
-               }
+               start_ammo_rockets = 999;
+               start_ammo_shells = 999;
+               start_ammo_cells = 999;
+               start_ammo_nails = 999;
+               start_ammo_fuel = 999;
        }
        else
        {