]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
Add a temporary client-server option to allow turning off auto switching in CTS
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index 0d4d2b92ab2c7221621379a5bf0b77b2d0730146..dfee5330df713431f4afba5cc9be713504171323 100644 (file)
@@ -856,7 +856,7 @@ float Item_GiveTo(entity item, entity player)
                return 0;
 
        // crude hack to enforce switching weapons
-       if(g_cts && item.itemdef.instanceOfWeaponPickup)
+       if(g_cts && item.itemdef.instanceOfWeaponPickup && !CS(player).cvar_cl_cts_noautoswitch)
        {
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {