wep.pickup_anyway = true; // these are ALWAYS pickable
//wa = W_AmmoItemCode(wpn);
- if(ammotype == RESOURCE_NONE)
+ if(ammotype == RES_NONE)
{
return 0;
}
GiveResource(own, ammotype, own.(weaponentity).(weapon_load[i]));
own.(weaponentity).(weapon_load[i]) = -1; // schedule the weapon for reloading
}
- SetResourceAmount(wep, ammotype, 0);
+ SetResource(wep, ammotype, 0);
}
else if(doreduce)
{
own.(weaponentity).(weapon_load[i]) = -1; // schedule the weapon for reloading
}
- float ownderammo = GetResourceAmount(own, ammotype);
- float thisammo = min(ownderammo, GetResourceAmount(wep, ammotype));
- SetResourceAmount(wep, ammotype, thisammo);
- SetResourceAmount(own, ammotype, ownderammo - thisammo);
+ float ownderammo = GetResource(own, ammotype);
+ float thisammo = min(ownderammo, GetResource(wep, ammotype));
+ SetResource(wep, ammotype, thisammo);
+ SetResource(own, ammotype, ownderammo - thisammo);
return thisammo;
}
if (!autocvar_g_pickup_items)
return false;
if (g_weaponarena)
- return 0;
- if(w == WEP_Null.m_id)
- return false;
+ return false;
+ if (w == WEP_Null.m_id)
+ return false;
return (Weapons_from(w)).weaponthrowable;
}