iconPos_x = (me.columnIconsSize - 3 * iconSize.x) * 0.5;
iconPos_y = (1 - iconSize.y) * 0.5;
- string n;
-
- if (!(me.seenIPv4 && me.seenIPv6))
- {
- iconPos.x += iconSize.x * 0.5;
- }
- else if(me.seenIPv4 && me.seenIPv6)
+ // IP
+ if(me.seenIPv4 && me.seenIPv6)
{
- n = string_null;
if(isv6)
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), 0); // PRECACHE_PIC_MIPMAP
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), iconSize, '1 1 1', 1);
else if(isv4)
- 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;
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), iconSize, '1 1 1', 1);
}
+ iconPos.x += iconSize.x;
+
+ // AES
if(q > 0)
- {
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), 0); // PRECACHE_PIC_MIPMAP
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
- }
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
+
iconPos.x += iconSize.x;
+ // Mod
if(modname == "Xonotic")
{
if(pure == 0)
- {
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), PRECACHE_PIC_MIPMAP);
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
- }
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure1"), iconSize, '1 1 1', 1);
}
else
{
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_", modname), PRECACHE_PIC_MIPMAP);
- if(draw_PictureSize(n) == '0 0 0')
- draw_PreloadPictureWithFlags(n = strcat(SKINGFX_SERVERLIST_ICON, "_mod_"), PRECACHE_PIC_MIPMAP);
+ string icon = strcat(SKINGFX_SERVERLIST_ICON, "_mod_", modname);
+ if(draw_PictureSize(icon) == '0 0 0')
+ icon = strcat(SKINGFX_SERVERLIST_ICON, "_mod_");
+
if(pure == 0)
- draw_Picture(iconPos, n, iconSize, '1 1 1', 1);
+ draw_Picture(iconPos, icon, iconSize, '1 1 1', 1);
else
- draw_Picture(iconPos, n, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE);
+ draw_Picture(iconPos, icon, iconSize, '1 1 1', SKINALPHA_SERVERLIST_ICON_NONPURE);
}
+
iconPos.x += iconSize.x;
+ // Stats
if(sflags >= 0 && (sflags & SERVERFLAG_PLAYERSTATS))
- {
- 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;
+ draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_stats1"), iconSize, '1 1 1', 1);
// --------------
// RENDER TEXT