]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into Melanosuchus/single_player Melanosuchus/single_player
authorMattia Basaglia <mattia.basaglia@gmail.com>
Sun, 9 Apr 2017 08:35:03 +0000 (09:35 +0100)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Sun, 9 Apr 2017 08:35:03 +0000 (09:35 +0100)
1  2 
defaultXonotic.cfg
qcsrc/common/mapinfo.qh
qcsrc/common/t_items.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/server/autocvars.qh
qcsrc/server/mutators/events.qh

Simple merge
Simple merge
index 8d01ccd178aff0bdd0891b7c822c2d7c7a5571d7,3151d7cdb1c86fb696128d439ef6a38213cff553..ad33d7805ddc96900b345619074b695c43c37bfe
@@@ -1024,30 -1024,23 +1024,23 @@@ float ammo_pickupevalfunc(entity player
                rating = item.bot_pickupbasevalue;
        }
  
-       if (need_shells)
-       if (item.ammo_shells)
-       if (player.ammo_shells < g_pickup_shells_max)
+       if ((need_shells) && (item.ammo_shells) && (player.ammo_shells < g_pickup_shells_max))
 -              c = item.ammo_shells / player.ammo_shells;
 +              c = item.ammo_shells / max(1, player.ammo_shells);
-       if (need_nails)
-       if (item.ammo_nails)
-       if (player.ammo_nails < g_pickup_nails_max)
+       if ((need_nails) && (item.ammo_nails) && (player.ammo_nails < g_pickup_nails_max))
 -              c = item.ammo_nails / player.ammo_nails;
 +              c = item.ammo_nails / max(1, player.ammo_nails);
-       if (need_rockets)
-       if (item.ammo_rockets)
-       if (player.ammo_rockets < g_pickup_rockets_max)
+       if ((need_rockets) && (item.ammo_rockets) && (player.ammo_rockets < g_pickup_rockets_max))
 -              c = item.ammo_rockets / player.ammo_rockets;
 +              c = item.ammo_rockets / max(1, player.ammo_rockets);
-       if (need_cells)
-       if (item.ammo_cells)
-       if (player.ammo_cells < g_pickup_cells_max)
+       if ((need_cells) && (item.ammo_cells) && (player.ammo_cells < g_pickup_cells_max))
 -              c = item.ammo_cells / player.ammo_cells;
 +              c = item.ammo_cells / max(1, player.ammo_cells);
-       if (need_plasma)
-       if (item.ammo_plasma)
-       if (player.ammo_plasma < g_pickup_plasma_max)
+       if ((need_plasma) && (item.ammo_plasma) && (player.ammo_plasma < g_pickup_plasma_max))
 -              c = item.ammo_plasma / player.ammo_plasma;
 +              c = item.ammo_plasma / max(1, player.ammo_plasma);
-       if (need_fuel)
-       if (item.ammo_fuel)
-       if (player.ammo_fuel < g_pickup_fuel_max)
+       if ((need_fuel) && (item.ammo_fuel) && (player.ammo_fuel < g_pickup_fuel_max))
 -              c = item.ammo_fuel / player.ammo_fuel;
 +              c = item.ammo_fuel / max(1, player.ammo_fuel);
  
        rating *= min(2, c);
        if(wpn)
Simple merge
Simple merge
Simple merge