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)
{
ATTRIB(Client, cvar_cl_accuracy_data_receive, bool, this.cvar_cl_accuracy_data_receive);
ATTRIBARRAY(Client, cvar_cl_weaponpriorities, string, 10);
ATTRIB(Client, cvar_cl_weaponpriority, string, this.cvar_cl_weaponpriority);
+ ATTRIB(Client, cvar_cl_cts_noautoswitch, bool, this.cvar_cl_cts_noautoswitch);
METHOD(Client, m_unwind, bool(Client this));
.float cvar_cl_jetpack_jump;
.float cvar_cl_movement_track_canjump;
.float cvar_cl_newusekeysupported;
+.float cvar_cl_cts_noautoswitch;
.string cvar_g_xonoticversion;
.string cvar_cl_weaponpriority;
REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion");
+REPLICATE(cvar_cl_cts_noautoswitch, bool, "cl_cts_noautoswitch");
+
/**
* @param f -1: cleanup, 0: request, 1: receive
*/
seta cl_race_cptimes_showself 1 "Always show your own times as well as the current best on checkpoints in Race/CTS"
seta cl_race_cptimes_onlyself 0 "Only show your own times on checkpoints in Race/CTS"
+seta cl_cts_noautoswitch 0 "Prevent forced switching to new weapons in CTS"
+
set cl_stripcolorcodes 0 "experimental feature (notes: strips ALL color codes from messages!)"
// Demo camera