From 09d98a2f7d09205efed74701ddea4c8a3ce24ed7 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 9 Mar 2011 17:35:00 +0100 Subject: [PATCH] simplify unlimited_weapon_ammo: just set all ammo counters to 999. Way simpler... --- qcsrc/server/miscfunctions.qc | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) 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 { -- 2.39.2