]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/util.qc
Restore white tos text
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / util.qc
index ac993e622bd0851e3eeb6ef5acb63c43f5e32a0c..f7c5b3f41d732e634ee7eb02974ed32408e1a48d 100644 (file)
@@ -26,7 +26,7 @@ void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, e
        depthfirst(root, parent, firstChild, nextSibling, funcPre, funcPost, pass);
 }
 
-.string cvarName;
+.string controlledCvar;
 void SUB_Null_ee(entity e1, entity e2)
 {
 }
@@ -53,12 +53,12 @@ void loadAllCvars(entity root)
        forAllDescendants(root, loadCvarsOf, SUB_Null_ee, NULL);
 }
 
-.string cvarNames_Multi;
+.string controlledCvars_Multi;
 .void(entity me) saveCvars_Multi;
 string getCvarsMulti(entity me)
 {
-       if (me.cvarNames_Multi)
-               return me.cvarNames_Multi;
+       if (me.controlledCvars_Multi)
+               return me.controlledCvars_Multi;
        return string_null;
 }
 void saveCvarsMulti(entity me)
@@ -67,9 +67,9 @@ void saveCvarsMulti(entity me)
        string s, cvarname;
 
        me.saveCvars_Multi(me);
-       s = cvar_string(me.cvarName);
+       s = cvar_string(me.controlledCvar);
 
-       n = tokenize_console(me.cvarNames_Multi);
+       n = tokenize_console(me.controlledCvars_Multi);
        for(i = 0; i < n; ++i)
        {
                // cvars prefixed with ! get saved with the inverted value
@@ -89,7 +89,7 @@ void saveCvarsMulti(entity me)
 }
 void makeMulti(entity e, string otherCvars)
 {
-       e.cvarNames_Multi = otherCvars;
+       e.controlledCvars_Multi = otherCvars;
        e.saveCvars_Multi = e.saveCvars;
        e.saveCvars = saveCvarsMulti;
 }
@@ -352,6 +352,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
        string s;
 
        string un_version = "";
+       string un_tosversion = "";
        string un_download = "";
        string un_url = "";
        string un_bannedservers = "";
@@ -372,6 +373,11 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                                un_version = s;
                                break;
                        }
+                       case "T":
+                       {
+                               un_tosversion = s;
+                               break;
+                       }
                        case "C":
                        {
                                un_compatexpire = s;
@@ -432,6 +438,11 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                }
        }
 
+       if(un_tosversion != "")
+       {
+               _Nex_ExtResponseSystem_NewToS = stof(un_tosversion);
+       }
+
        if(un_bannedservers != "")
        {
                _Nex_ExtResponseSystem_BannedServers = strzone(un_bannedservers);
@@ -582,6 +593,7 @@ void preMenuDraw()
                draw_CenterText(mid - 1 * line, l1, fs, '1 0 0', 1, 0);
                draw_CenterText(mid - 0 * line, l2, fs, '0 0 1', 1, 0);
        }
+
        if (!campaign_name_previous)
                campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
        if(campaign_name == campaign_name_previous)