]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/util.qc
Make Centerprint Panel title coherent with other panel dialogs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / util.qc
index 28987529a639edd2a5743311229c3e081446bdc2..74b60d30aef98a01243a99b34117b8a19e00ae37 100644 (file)
@@ -89,7 +89,7 @@ void saveCvarsMulti(entity me)
        for(i = 0; i < n; ++i)
        {
                if(substring(argv(i), 0, 1) == "!")
-                       cvar_set(substring(argv(i), 1, strlen(argv(i))), ftos(!stof(s)));
+                       cvar_set(substring(argv(i), 1, strlen(argv(i))), ((s == "0") ? "1" : "0"));
                else
                        cvar_set(argv(i), s);
        }
@@ -285,7 +285,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               print(sprintf("Received HTTP request data for an invalid id %d.\n", id));
+               printf("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
@@ -305,7 +305,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
        }
        if(status != 0)
        {
-               print(sprintf(_("error receiving update notification: status is %d\n"), status));
+               printf(_("error receiving update notification: status is %d\n"), status);
                return;
        }
        if(substring(data, 0, 1) == "<")
@@ -394,7 +394,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                {
                        // update needed
                        _Nex_ExtResponseSystem_UpdateTo = strzone(un_version);
-                       if(un_download) { print(sprintf(_("Update can be downloaded at:\n%s\n"), un_download)); }
+                       if(un_download) { printf(_("Update can be downloaded at:\n%s\n"), un_download); }
                        if(un_url) { _Nex_ExtResponseSystem_UpdateToURL = strzone(un_url); }
                        DisableServerBackwardsCompatibility();
                }
@@ -656,9 +656,10 @@ float updateCompression()
        GAMETYPE(MAPINFO_TYPE_LMS) \
        GAMETYPE(MAPINFO_TYPE_NEXBALL) \
        GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
-       GAMETYPE(MAPINFO_TYPE_RACE) \
+       if (cvar("developer")) GAMETYPE(MAPINFO_TYPE_RACE) \
        GAMETYPE(MAPINFO_TYPE_CTS) \
        GAMETYPE(MAPINFO_TYPE_TEAM_DEATHMATCH) \
+       //GAMETYPE(MAPINFO_TYPE_INVASION) \
        /* nothing */
 
 float GameType_GetID(float cnt)
@@ -666,7 +667,7 @@ float GameType_GetID(float cnt)
        float i;
        i = 0;
 
-       #define GAMETYPE(id) if(i++ == cnt) return id;
+       #define GAMETYPE(id) { if(i++ == cnt) return id; }
        GAMETYPES
        #undef GAMETYPE