Commit 18742c21 authored by terencehill's avatar terencehill

Small cleanup

parent ea49a883
Pipeline #5574104 failed with stage
in 13 minutes and 55 seconds
......@@ -926,7 +926,7 @@ float weapon_pickupevalfunc(entity player, entity item)
float c;
// See if I have it already
if(!(item.weapons & ~player.weapons))
if(player.weapons & item.weapons)
{
// If I can pick it up
if(!item.spawnshieldtime)
......@@ -942,8 +942,11 @@ float weapon_pickupevalfunc(entity player, entity item)
else
c = 1;
if (c <= 0)
return 0;
// If custom weapon priorities for bots is enabled rate most wanted weapons higher
if( bot_custom_weapon && c )
if(bot_custom_weapon)
{
int best_ratio = 0;
int missing = 0;
......@@ -990,9 +993,8 @@ float weapon_pickupevalfunc(entity player, entity item)
float commodity_pickupevalfunc(entity player, entity item)
{
float c;
float need_shells = false, need_nails = false, need_rockets = false, need_cells = false, need_plasma = false, need_fuel = false;
c = 0;
bool need_shells = false, need_nails = false, need_rockets = false, need_cells = false, need_plasma = false, need_fuel = false;
float c = 0;
// Detect needed ammo
FOREACH(Weapons, it != WEP_Null, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment