From: Mario Date: Sun, 30 Aug 2015 13:04:18 +0000 (+1000) Subject: Add a bad hack to fix CTS not forcing the switch to a newly picked up weapon X-Git-Tag: xonotic-v0.8.2~1949 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7d34f72f79a860ad647ac47d4314ad4f9b0ccf06;p=xonotic%2Fxonotic-data.pk3dir.git Add a bad hack to fix CTS not forcing the switch to a newly picked up weapon --- diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index c78b2fda9..bf222ea33 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -669,6 +669,13 @@ float Item_GiveTo(entity item, entity player) if (!pickedup) return 0; + // crude hack to enforce switching weapons + if(g_cts && (item.flags & FL_WEAPON)) + { + W_SwitchWeapon_Force(player, item.weapon); + return 1; + } + if (_switchweapon) if (player.switchweapon != w_getbestweapon(player)) W_SwitchWeapon_Force(player, w_getbestweapon(player));