From: Mario Date: Fri, 23 Sep 2016 17:23:31 +0000 (+1000) Subject: Default curl maxspeed to unlimited and allow 3 downloads at the same time (it's not... X-Git-Tag: xonotic-v0.8.2~570 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6e5466c605b0a14dddaf4730b106f4e31cb20b0e;p=xonotic%2Fxonotic-data.pk3dir.git Default curl maxspeed to unlimited and allow 3 downloads at the same time (it's not 2005 anymore) Rework download speed slider to show more sane values, including an "unlimited" option --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index dd097e60c..9a212486c 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -684,7 +684,8 @@ alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultpl seta sv_servermodelsonly 1 cl_curl_enabled 1 -cl_curl_maxspeed 500 +cl_curl_maxdownloads 3 +cl_curl_maxspeed 0 cl_curl_useragent 1 cl_curl_useragent_append "$g_xonoticversion" diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.qc b/qcsrc/menu/xonotic/dialog_settings_misc.qc index ede6543e7..8f98df581 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc.qc @@ -9,6 +9,8 @@ #include "mainwindow.qh" #define ADDVALUE_FPS(i) e.addValue(e, strzone(sprintf(_("%d fps"), i)), #i) +#define ADDVALUE_SPEED_KB(i) e.addValue(e, strzone(sprintf(_("%d kb/s"), i)), #i) +#define ADDVALUE_SPEED_MB(i, j) e.addValue(e, strzone(sprintf(_("%d MB/s"), i)), #j) entity makeXonoticMiscSettingsTab() { entity me; @@ -51,9 +53,16 @@ void XonoticMiscSettingsTab_fill(entity me) me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 5, 1, "cl_curl_maxdownloads", _("Maximum number of concurrent HTTP/FTP downloads"))); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Speed (kB/s):"))); - me.TD(me, 1, 2, e = makeXonoticSlider_T(10, 2000, 50, "cl_curl_maxspeed", - _("Maximum download speed"))); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Download speed:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_curl_maxspeed")); + ADDVALUE_SPEED_KB(50); + ADDVALUE_SPEED_KB(100); + ADDVALUE_SPEED_KB(300); + ADDVALUE_SPEED_KB(500); + ADDVALUE_SPEED_MB(1, 1000); + ADDVALUE_SPEED_MB(2, 2000); + e.addValue(e, strzone(_("Unlimited")), "0"); + e.configureXonoticTextSliderValues(e); me.TR(me); if(cvar("developer")) {