]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/util.qc
Add Terms of Service Popup and server-specific Terms of Service tab
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / util.qc
index e77049d200153e9c2f15fb0ca097edd1c1649fe3..06139566d85ad6a50c30af6d3f09d19a3eca418d 100644 (file)
@@ -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;
@@ -431,6 +437,12 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                        }
                }
        }
+       
+       if(un_tosversion != "")
+       {
+               _Nex_ExtResponseSystem_NewToS = stof(un_tosversion);
+               LOG_INFOF("Latest ToS version is %d", _Nex_ExtResponseSystem_NewToS);
+       }
 
        if(un_bannedservers != "")
        {
@@ -582,6 +594,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)