]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/combined_updates
authorSamual Lenks <samual@xonotic.org>
Tue, 15 Oct 2013 19:34:09 +0000 (15:34 -0400)
committerSamual Lenks <samual@xonotic.org>
Tue, 15 Oct 2013 19:34:09 +0000 (15:34 -0400)
gfx/menu/luminos/skinvalues.txt
qcsrc/client/csqcmodel_hooks.qc
qcsrc/common/notifications.qh
qcsrc/dpdefs/csprogsdefs.qc
qcsrc/dpdefs/dpextensions.qc
qcsrc/dpdefs/menudefs.qc
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/dialog_settings_video.c
qcsrc/menu/xonotic/slider_resolution.c

index 2277f9d684231dc4abdd688c87784a4980710ce8..315d44f205d3ab055caf4be92e9801dcf0cbbcba 100755 (executable)
@@ -126,7 +126,7 @@ COLOR_SERVERINFO_IP             '1 0.4375 0'
 
 // item: server list
 ALPHA_SERVERLIST_FULL           0.4
-ALPHA_SERVERLIST_EMPTY          0.7
+ALPHA_SERVERLIST_EMPTY          0.6
 COLOR_SERVERLIST_LOWPING        '0 1 0'
 COLOR_SERVERLIST_MEDPING        '1 0.75 0'
 COLOR_SERVERLIST_HIGHPING       '1 0 0'
index b2c98e4ed4aab27040de2b888c0a6ef1a5f3431c..3837ed4c97b50823be3f604172221766a4c79cbb 100644 (file)
@@ -180,7 +180,7 @@ void CSQCPlayer_ModelAppearance_Apply(float islocalplayer)
        float isfriend;
        float cm;
        cm = self.forceplayermodels_savecolormap;
-       cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(self.colormap - 1, "colors")) + 1024);
+       cm = (cm >= 1024) ? cm : (stof(getplayerkeyvalue(cm - 1, "colors")) + 1024);
 
        if(teamplay)
                isfriend = (cm == 1024 + 17 * myteam);
index 0214ec3d6122c2e596ca84b8e8b8c92f524d2f6a..e8e92f01834cb4b83b588c8d83da8716ce6cfae0 100644 (file)
@@ -230,7 +230,7 @@ void Send_Notification_WOCOVA(
        MSG_ANNCE_NOTIF(default, prefix##YELLOW, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), volume, position) \
        MSG_ANNCE_NOTIF(default, prefix##PINK, channel, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), volume, position)
 #define MULTITEAM_ANNCE(default,prefix,teams,channel,sound,volume,position) \
-       MSG_ANNCE_NOTIF_##teams(default,prefix,channel,sound,volume,position) \
+       MULTITEAM_ANNCE##teams(default,prefix,channel,sound,volume,position)
 
 #define MSG_ANNCE_NOTIFICATIONS \
        MSG_ANNCE_NOTIF(1, ANNCE_ACHIEVEMENT_AIRSHOT,       CH_INFO, "airshot",           VOL_BASEVOICE, ATTEN_NONE) \
index f858afba2fdaa3457f8c1cc33b63dfcf336a9b3c..324f8082f75bf98f12fa9026a154ed3e91532c55 100644 (file)
@@ -447,6 +447,7 @@ string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
 string(float chars, string s, ...) strpad = #225;
 string(string info, string key, string value, ...) infoadd = #226;
 string(string info, string key) infoget = #227;
+float(string s1, string s2) strcmp = #228;
 float(string s1, string s2, float len) strncmp = #228;
 float(string s1, string s2) strcasecmp = #229;
 float(string s1, string s2, float len) strncasecmp = #230;
index 0a5504392736ebd13e4ee1456a5bb39e80a71950..39a2f593a1e0e8ec792b5c6f4f8b86115fce7632 100644 (file)
@@ -2426,6 +2426,7 @@ string(float ccase, float calpha, float cnum, string s, ...) strconv = #224; //
 string(float chars, string s, ...) strpad = #225; // pad string with spaces to a specified length, < 0 = left padding, > 0 = right padding
 string(string info, string key, string value, ...) infoadd = #226; // sets or adds a key/value pair to an infostring - note: forbidden characters are \ and "
 string(string info, string key) infoget = #227; // gets a key/value pair in an infostring, returns value or null if not found
+float(string s1, string s2) strcmp = #228; // compare two strings
 float(string s1, string s2, float len) strncmp = #228; // compare two strings up to the specified number of characters, if their length differs and is within the specified limit the result will be negative, otherwise it is the difference in value of their first non-matching character.
 float(string s1, string s2) strcasecmp = #229; // compare two strings with case-insensitive matching, characters a-z are considered equivalent to the matching A-Z character, no other differences, and this does not consider special characters equal even if they look similar
 float(string s1, string s2, float len) strncasecmp = #230; // same as strcasecmp but with a length limit, see strncmp
index 1f817cd2029de82d68bba5731993800a9d778ea0..d976973253cb3251865edcb86da2d439c48cf6aa 100644 (file)
@@ -401,6 +401,7 @@ string(float ccase, float calpha, float cnum, string s, ...) strconv = #224;
 string(float chars, string s, ...) strpad = #225;
 string(string info, string key, string value, ...) infoadd = #226;
 string(string info, string key) infoget = #227;
+float(string s1, string s2) strcmp = #228;
 float(string s1, string s2, float len) strncmp = #228;
 float(string s1, string s2) strcasecmp = #229;
 float(string s1, string s2, float len) strncasecmp = #230;
index 1041c168fb21bd8a00f764a186cd14927854fa3c..e89761cc34338b4ca6225cce9750fbb61926fd62 100644 (file)
@@ -51,6 +51,12 @@ void GameCommand(string theCommand)
                return;
        }
 
+       if(argv(0) == "update_conwidths_before_vid_restart")
+       {
+               updateConwidths(cvar("vid_width"), cvar("vid_height"), cvar("vid_pixelheight"));
+               return;
+       }
+
        if(argv(0) == "directmenu" || argv(0) == "directpanelhudmenu")
        {
                string filter = string_null;
index 8b8ca2d0dbf27fa8956522ca57a2ac4f0a087736..99e8ea7d63c506b9d741aa5536f31352edac22c3 100644 (file)
@@ -112,7 +112,8 @@ void UpdateConWidthHeight(float w, float h, float p)
 {
        if (w != vidwidth_s || h != vidheight_s || p != vidpixelheight_s)
        {
-               updateConwidths(w, h, p);
+               if (updateConwidths(w, h, p))
+                       localcmd(sprintf("\nexec %s\n", cvar_string("menu_font_cfg")));
                vidwidth_s = w;
                vidheight_s = h;
                vidpixelheight_s = p;
index d7e5ae2d8dbb1e067abe96fe764da9bb78bbb202..1258648a49092f0add63996526e28f7e13b5fb3e 100644 (file)
@@ -140,6 +140,6 @@ void XonoticVideoSettingsTab_fill(entity me)
        }
 
        me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_width $_menu_vid_width; vid_height $_menu_vid_height; vid_pixelheight $_menu_vid_pixelheight; vid_desktopfullscreen $_menu_vid_desktopfullscreen; vid_restart; menu_restart; menu_cmd videosettings", COMMANDBUTTON_APPLY));
+               me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_width $_menu_vid_width; vid_height $_menu_vid_height; vid_pixelheight $_menu_vid_pixelheight; vid_desktopfullscreen $_menu_vid_desktopfullscreen; menu_cmd update_conwidths_before_vid_restart; vid_restart; menu_cmd sync", COMMANDBUTTON_APPLY));
 }
 #endif
index 5914e9aff068e812d7583ac813aa05a1266e1315..66f48f9e58ef2bf26f838e6736889632fe659d1a 100644 (file)
@@ -9,7 +9,7 @@ CLASS(XonoticResolutionSlider) EXTENDS(XonoticTextSlider)
        ATTRIB(XonoticResolutionSlider, vid_fullscreen, float, -1)
 ENDCLASS(XonoticResolutionSlider)
 entity makeXonoticResolutionSlider();
-void updateConwidths(float width, float height, float pixelheight);
+float updateConwidths(float width, float height, float pixelheight);
 #endif
 
 #ifdef IMPLEMENTATION
@@ -17,12 +17,16 @@ void updateConwidths(float width, float height, float pixelheight);
 /* private static */ float XonoticResolutionSlider_DataHasChanged;
 
 // Updates cvars (to be called by menu.qc at startup or on detected res change)
-void updateConwidths(float width, float height, float pixelheight)
+float updateConwidths(float width, float height, float pixelheight)
 {
        vector r, c;
        float minfactor, maxfactor;
        float sz, f;
 
+       sz = cvar("menu_vid_scale");
+       if (sz < -1)
+               return 0;  // No recalculation.
+
        // Save off current settings.
        cvar_set("_menu_vid_width", ftos(width));
        cvar_set("_menu_vid_height", ftos(height));
@@ -32,7 +36,6 @@ void updateConwidths(float width, float height, float pixelheight)
        r_x = width;
        r_y = height;
        r_z = pixelheight;
-       sz = cvar("menu_vid_scale");
 
        // calculate the base resolution
        c_z = 0;
@@ -64,14 +67,16 @@ void updateConwidths(float width, float height, float pixelheight)
        c_x = rint(c_x);
        c_y = rint(c_y);
 
+       // Please reload resolutions list and such stuff.
+       XonoticResolutionSlider_DataHasChanged = TRUE;
+
        if (c_x != cvar("vid_conwidth") || c_y != cvar("vid_conheight"))
        {
                cvar_set("vid_conwidth", ftos(c_x));
                cvar_set("vid_conheight", ftos(c_y));
-               localcmd("\nr_restart\n");
+               return 1;
        }
-
-       XonoticResolutionSlider_DataHasChanged = TRUE;
+       return 0;
 }
 entity makeXonoticResolutionSlider()
 {