From ab7e59a9204ff46a066a0f0dc7a6111ede6b4963 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Tue, 7 May 2002 18:48:52 +0000 Subject: [PATCH] added punkbuster label for rtcw git-svn-id: http://svn.code.sf.net/p/xqf/code/trunk@163 d2ac09be-c843-0410-8b1f-f8a84130e0ec --- xqf/ChangeLog | 3 +++ xqf/src/game.c | 3 +++ xqf/src/srv-list.c | 10 ++++++++-- xqf/src/xqf.h | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/xqf/ChangeLog b/xqf/ChangeLog index 9109d63..7bc4739 100644 --- a/xqf/ChangeLog +++ b/xqf/ChangeLog @@ -1,3 +1,6 @@ +May 07, 2002: Ludwig Nussel +- Added punkbuster label for rtcw. Yes it's ugly but ... + May 05, 2002: Ludwig Nussel - fix LAN Browsing for games that need a port change (Rune) - replaced static struct for q3 options with a more flexible g_datalist diff --git a/xqf/src/game.c b/xqf/src/game.c index c14d516..9e20f08 100644 --- a/xqf/src/game.c +++ b/xqf/src/game.c @@ -1518,6 +1518,9 @@ static void q3_analyze_serverinfo (struct server *s) { else if (strcmp (*info_ptr, "sv_privateClients") == 0) { s->private_client = strtol (info_ptr[1], NULL, 10); } + else if (!strcmp(*info_ptr, "sv_punkbuster") && info_ptr[1] && info_ptr[1][0] == '1') { + s->flags |= SERVER_PUNKBUSTER; + } } if(fs_game) diff --git a/xqf/src/srv-list.c b/xqf/src/srv-list.c index 39a75f7..dca0018 100644 --- a/xqf/src/srv-list.c +++ b/xqf/src/srv-list.c @@ -95,6 +95,7 @@ static int server_clist_refresh_row (struct server *s, int row) { char *retries; struct pixmap *retries_pix = NULL; int col; + char* private_col_text = ""; text[0] = NULL; @@ -184,12 +185,17 @@ static int server_clist_refresh_row (struct server *s, int row) { + if (s->flags & SERVER_PUNKBUSTER ) + { + private_col_text = "Pb"; + } + /* Show if the server is private or not */ if (s->flags & SERVER_PASSWORD ) { - gtk_clist_set_pixtext (server_clist, row, 4, "", 0, + gtk_clist_set_pixtext (server_clist, row, 4, private_col_text, 0, locked_pix.pix, locked_pix.mask ); } else { - gtk_clist_set_text (server_clist, row, 4, "" ); + gtk_clist_set_text (server_clist, row, 4, private_col_text ); } get_server_pixmap (main_window, s, &server_pixmap_cache, &server_pixmap, diff --git a/xqf/src/xqf.h b/xqf/src/xqf.h index a872dbf..28905b7 100644 --- a/xqf/src/xqf.h +++ b/xqf/src/xqf.h @@ -77,6 +77,7 @@ #define SERVER_PASSWORD 0x10 #define SERVER_SP_PASSWORD 0x20 #define SERVER_SPECTATE 0x40 +#define SERVER_PUNKBUSTER 0x80 enum launch_mode { LAUNCH_NORMAL,