From b5cad6bb206ae85a25f069cc9b5eca0288ff83ca Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Sun, 2 Jun 2002 22:22:04 +0000 Subject: [PATCH] Bug in the server browser --- reaction/ta_ui/ta_ui.plg | 12 ++++++------ reaction/ta_ui/ui_main.c | 24 +++++++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/reaction/ta_ui/ta_ui.plg b/reaction/ta_ui/ta_ui.plg index 8aae2a37..e682da2f 100644 --- a/reaction/ta_ui/ta_ui.plg +++ b/reaction/ta_ui/ta_ui.plg @@ -6,13 +6,13 @@ --------------------Configuration: ui - Win32 Release TA--------------------

Command Lines

-Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP111.tmp" with contents +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A0.tmp" with contents [ /nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c -"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_shared.c" +"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c" ] -Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP111.tmp" -Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP112.tmp" with contents +Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A0.tmp" +Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A1.tmp" with contents [ /nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib" .\Release_TA\bg_misc.obj @@ -26,10 +26,10 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP112.tmp" with conte .\Release_TA\ui_syscalls.obj .\Release_TA\ui_util.obj ] -Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP112.tmp" +Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP1A1.tmp"

Output Window

Compiling... -ui_shared.c +ui_main.c Linking... Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp diff --git a/reaction/ta_ui/ui_main.c b/reaction/ta_ui/ui_main.c index 30f7705e..f793fe8b 100644 --- a/reaction/ta_ui/ui_main.c +++ b/reaction/ta_ui/ui_main.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.26 2002/06/02 22:22:04 makro +// Bug in the server browser +// // Revision 1.25 2002/06/02 00:15:07 makro // Small fixes // @@ -132,7 +135,6 @@ static const serverFilter_t serverFilters[] = { {"Weapons Factory Arena", "wfa" }, {"OSP", "osp" }, {"All", "" },*/ - {"Reaction", "reaction" }, //Makro - hack !!! {"Reaction", "reaction" } }; @@ -2819,18 +2821,19 @@ static qboolean UI_NetFilter_HandleKey(int flags, float *special, int key) { //Makro - left/right support if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER || key == K_LEFTARROW || key == K_RIGHTARROW) { - if (key == K_MOUSE2 || key == K_LEFTARROW) { - ui_serverFilterType.integer--; - } else { - ui_serverFilterType.integer++; - } + if (key == K_MOUSE2 || key == K_LEFTARROW) { + ui_serverFilterType.integer--; + } else { + ui_serverFilterType.integer++; + } if (ui_serverFilterType.integer >= numServerFilters) { ui_serverFilterType.integer = 0; } else if (ui_serverFilterType.integer < 0) { ui_serverFilterType.integer = numServerFilters - 1; - } - UI_BuildServerDisplayList(qtrue); + } + + UI_BuildServerDisplayList(qtrue); return qtrue; } return qfalse; @@ -4213,12 +4216,15 @@ static void UI_BuildServerDisplayList(qboolean force) { } } - if (ui_serverFilterType.integer > 0) { + //Makro - changed check + //if (ui_serverFilterType.integer > 0) { + if (serverFilters[ui_serverFilterType.integer].basedir[0]) { if (Q_stricmp(Info_ValueForKey(info, "game"), serverFilters[ui_serverFilterType.integer].basedir) != 0) { trap_LAN_MarkServerVisible(ui_netSource.integer, i, qfalse); continue; } } + // make sure we never add a favorite server twice if (ui_netSource.integer == AS_FAVORITES) { UI_RemoveServerFromDisplayList(i);