]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/serverlist.c
Merge branch 'master' into terencehill/ca_arena_freezetag_bugfixes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / serverlist.c
index a8494f8defe2b6ace5e30793af4295e86f7e07c6..9e49626023375b96651e5fa13bc4c2e50d0f6c54 100644 (file)
@@ -608,6 +608,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
 
        s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
        m = tokenizebyseparator(s, ":");
+       typestr = "";
        if(m >= 2)
        {
                typestr = argv(0);
@@ -616,6 +617,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        freeslots = -1;
        sflags = -1;
        modname = "";
+       pure = 0;
        for(j = 2; j < m; ++j)
        {
                if(argv(j) == "")
@@ -637,16 +639,20 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                modname = "Xonotic";
 #endif
 
+       /*
        SLIST_FIELD_MOD = gethostcacheindexforkey("mod");
        s = gethostcachestring(SLIST_FIELD_MOD, i);
        if(s != "data")
                if(modname == "Xonotic")
                        modname = s;
+       */
 
        // list the mods here on which the pure server check actually works
        if(modname != "Xonotic")
        if(modname != "MinstaGib")
        if(modname != "CTS")
+       if(modname != "NIX")
+       if(modname != "NewToys")
                pure = 0;
 
        if(gethostcachenumber(SLIST_FIELD_FREESLOTS, i) <= 0)
@@ -727,11 +733,11 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        // 5: AES required
 
        {
-               vector iconSize;
+               vector iconSize = '0 0 0';
                iconSize_y = me.realFontSize_y * me.iconsSizeFactor;
                iconSize_x = me.realFontSize_x * me.iconsSizeFactor;
 
-               vector iconPos;
+               vector iconPos = '0 0 0';
                iconPos_x = (me.columnIconsSize - 3 * iconSize_x) * 0.5;
                iconPos_y = (1 - iconSize_y) * 0.5;
 
@@ -745,9 +751,9 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
                {
                        n = string_null;
                        if(isv6)
-                               draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), PRECACHE_PIC_MIPMAP);
+                               draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), 0); // PRECACHE_PIC_MIPMAP
                        else if(isv4)
-                               draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), PRECACHE_PIC_MIPMAP);
+                               draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), 0); // PRECACHE_PIC_MIPMAP
                        if(n)
                                draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
                        iconPos_x += iconSize_x;
@@ -755,7 +761,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
 
                if(q > 0)
                {
-                       draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), PRECACHE_PIC_MIPMAP);
+                       draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), 0); // PRECACHE_PIC_MIPMAP
                        draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
                }
                iconPos_x += iconSize_x;
@@ -782,7 +788,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
 
                if(sflags >= 0 && (sflags & SERVERFLAG_PLAYERSTATS))
                {
-                       draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_stats1"), PRECACHE_PIC_MIPMAP);
+                       draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_stats1"), 0); // PRECACHE_PIC_MIPMAP
                        draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
                }
                iconPos_x += iconSize_x;
@@ -819,7 +825,9 @@ float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
                {
                        main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
                        DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
+                       return 1;
                }
+               return 0;
        }
        else if(scan == K_INS || scan == K_MOUSE3 || scan == K_KP_INS)
        {
@@ -828,7 +836,9 @@ float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
                {
                        ToggleFavorite(me.selectedServer);
                        me.ipAddressBoxFocused = -1;
+                       return 1;
                }
+               return 0;
        }
        else if(SUPER(XonoticServerList).keyDown(me, scan, ascii, shift))
                return 1;