ATTRIB(XonoticServerList, infoButton, entity, NULL)
ATTRIB(XonoticServerList, currentSortOrder, float, 0)
ATTRIB(XonoticServerList, currentSortField, float, -1)
- ATTRIB(XonoticServerList, lastBumpSelectTime, float, 0)
ATTRIB(XonoticServerList, lastClickedServer, float, -1)
ATTRIB(XonoticServerList, lastClickedTime, float, 0)
#define SLIST_CATEGORIES \
SLIST_CATEGORY(CAT_FAVORITED, "", "", ZCTX(_("SLCAT^Favorites"))) \
- SLIST_CATEGORY(CAT_RECOMMENDED, "", "CAT_SERVERS", ZCTX(_("SLCAT^Recommended"))) \
+ SLIST_CATEGORY(CAT_RECOMMENDED, "", "", ZCTX(_("SLCAT^Recommended"))) \
SLIST_CATEGORY(CAT_NORMAL, "", "CAT_SERVERS", ZCTX(_("SLCAT^Normal Servers"))) \
SLIST_CATEGORY(CAT_SERVERS, "CAT_NORMAL", "CAT_SERVERS", ZCTX(_("SLCAT^Servers"))) \
SLIST_CATEGORY(CAT_XPM, "CAT_NORMAL", "CAT_SERVERS", ZCTX(_("SLCAT^Competitive Mode"))) \
} \
else \
{ \
- print(sprintf( \
+ printf( \
"RegisterSLCategories(): Improper override '%s' for category '%s'!\n", \
s, \
categories[i].cat_name \
- )); \
+ ); \
} \
} \
strunzone(categories[i].override_string); \
case "cts":
case "xdf": { return CAT_DEFRAG; }
- default: { dprint(sprintf("Found strange mod type: %s\n", modtype)); return CAT_MODIFIED; }
+ default: { dprintf("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; }
}
}
f = 1;
--i;
}
-
+
if(!f)
{
s1 = "";
float m, pure, freeslots, j, sflags;
string s, typestr, versionstr, k, v, modname;
- //print(sprintf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems));
+ //printf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems);
vector oldscale = draw_scale;
vector oldshift = draw_shift;
theAlpha = SKINALPHA_SERVERLIST_FULL;
else if(freeslots == 0)
theAlpha = SKINALPHA_SERVERLIST_FULL; // g_maxplayers support
- else if not(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i))
+ else if (!gethostcachenumber(SLIST_FIELD_NUMHUMANS, i))
theAlpha = SKINALPHA_SERVERLIST_EMPTY;
else
theAlpha = 1;
string n;
- if not(me.seenIPv4 && me.seenIPv6)
+ if (!(me.seenIPv4 && me.seenIPv6))
{
iconPos_x += iconSize_x * 0.5;
}
float XonoticServerList_keyDown(entity me, float scan, float ascii, float shift)
{
- float i = me.selectedItem;
vector org, sz;
org = boxToGlobal(eY * (me.selectedItem * me.itemHeight - me.scrollPos), me.origin, me.size);
sz = boxToGlobalSize(eY * me.itemHeight + eX * (1 - me.controlWidth), me.size);
- me.lastBumpSelectTime = 0;
-
if(scan == K_ENTER || scan == K_KP_ENTER)
{
ServerList_Connect_Click(NULL, me);
{
if(me.nItems != 0)
{
- main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, i);
+ main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
return 1;
}