]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Merge remote-tracking branch 'origin/terencehill/g_changeteam_banned_fix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index 99ddc018b95a08352eabb2df2a3ac8fc14b276fc..f7a8d2aec157a966e0299a89402e2b280af92721 100644 (file)
@@ -279,7 +279,6 @@ float Item_GiveTo(entity item, entity player)
                        {
                                pickedup = TRUE;
                                // play some cool sounds ;)
-                               centerprint(player, "\n");
                                if (clienttype(player) == CLIENTTYPE_REAL)
                                {
                                        if(player.health <= 5)
@@ -391,7 +390,7 @@ float Item_GiveTo(entity item, entity player)
                }
 
                if (item.flags & FL_WEAPON)
-               if ((it = item.weapons - (item.weapons & player.weapons)) || (g_pickup_weapons_anyway && !(g_weapon_stay == 3 && !e.spawnshieldtime)))
+                       if ((it = item.weapons - (item.weapons & player.weapons)) || (g_pickup_weapons_anyway && g_weapon_stay == 0))
                {
                        pickedup = TRUE;
                        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
@@ -560,7 +559,7 @@ void RemoveItem(void)
 // pickup evaluation functions
 // these functions decide how desirable an item is to the bots
 
-float generic_pickupevalfunc(entity player, entity item) {return item.bot_pickupbasevalue;};
+float generic_pickupevalfunc(entity player, entity item) {return item.bot_pickupbasevalue;}
 
 float weapon_pickupevalfunc(entity player, entity item)
 {
@@ -617,7 +616,7 @@ float weapon_pickupevalfunc(entity player, entity item)
        }
 
        return item.bot_pickupbasevalue * c;
-};
+}
 
 float commodity_pickupevalfunc(entity player, entity item)
 {
@@ -670,7 +669,7 @@ float commodity_pickupevalfunc(entity player, entity item)
                c = c + max(0, 1 - player.health / item.max_health);
 
        return item.bot_pickupbasevalue * c;
-};
+}
 
 
 .float is_item;
@@ -856,7 +855,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
  */
 void minstagib_items (float itemid)
 {
-       local float rnd;
+       float rnd;
        self.classname = "minstagib";
 
        // replace rocket launchers and nex guns with ammo cells
@@ -1042,7 +1041,7 @@ void weapon_defaultspawnfunc(float wpn)
 
 void spawnfunc_weapon_shotgun (void);
 void spawnfunc_weapon_uzi (void) {
-       if(q3acompat_machineshotgunswap)
+       if(autocvar_sv_q3acompat_machineshotgunswap)
        if(self.classname != "droppedweapon")
        {
                weapon_defaultspawnfunc(WEP_SHOTGUN);
@@ -1052,7 +1051,7 @@ void spawnfunc_weapon_uzi (void) {
 }
 
 void spawnfunc_weapon_shotgun (void) {
-       if(q3acompat_machineshotgunswap)
+       if(autocvar_sv_q3acompat_machineshotgunswap)
        if(self.classname != "droppedweapon")
        {
                weapon_defaultspawnfunc(WEP_UZI);
@@ -1108,7 +1107,7 @@ void spawnfunc_item_rockets (void) {
 void spawnfunc_item_shells (void);
 void spawnfunc_item_bullets (void) {
        if(!weaponswapping)
-       if(q3acompat_machineshotgunswap)
+       if(autocvar_sv_q3acompat_machineshotgunswap)
        if(self.classname != "droppedweapon")
        {
                weaponswapping = TRUE;
@@ -1134,7 +1133,7 @@ void spawnfunc_item_cells (void) {
 
 void spawnfunc_item_shells (void) {
        if(!weaponswapping)
-       if(q3acompat_machineshotgunswap)
+       if(autocvar_sv_q3acompat_machineshotgunswap)
        if(self.classname != "droppedweapon")
        {
                weaponswapping = TRUE;