From: Rudolf Polzer Date: Wed, 9 Mar 2011 16:35:00 +0000 (+0100) Subject: simplify unlimited_weapon_ammo: just set all ammo counters to 999. Way simpler... X-Git-Tag: xonotic-v0.5.0~309^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=09d98a2f7d09205efed74701ddea4c8a3ce24ed7;p=xonotic%2Fxonotic-data.pk3dir.git simplify unlimited_weapon_ammo: just set all ammo counters to 999. Way simpler... --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 4d388068f..4f6d9868f 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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 {