[SCM] Quake 3 engine branch, master, updated. debian/1.36+svn1802-2+dbg-12-ga1a81c1

Simon McVittie smcv at debian.org
Sat Feb 5 22:33:57 UTC 2011


The following commit has been merged in the master branch:
commit b20502b8352866688a55fc792950239a551ccf93
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Feb 5 13:21:18 2011 +0000

    Replace patch 0014 with Zack Middleton's version from upstream bugzilla, which automatically counts human players, independent of the mod

diff --git a/debian/changelog b/debian/changelog
index 87a1f46..b12770c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ ioquake3 (1.36+svn1858-1) UNRELEASED; urgency=low
     - add patch 0015: openarena in experimental relies on being able to set
       com_standalone 1 on the command line, so bring back that functionality,
       and copy com_basegame from fs_basegame if used
+  * Replace patch 0014 with Zack Middleton's version from upstream bugzilla,
+    which automatically counts human players, independent of the mod
 
  -- Simon McVittie <smcv at debian.org>  Fri, 04 Feb 2011 20:15:33 +0000
 
diff --git a/debian/patches/0014-Put-g_humanplayers-and-g_needpass-in-server-info.patch b/debian/patches/0014-Put-g_humanplayers-and-g_needpass-in-server-info.patch
index 2a24106..38e8643 100644
--- a/debian/patches/0014-Put-g_humanplayers-and-g_needpass-in-server-info.patch
+++ b/debian/patches/0014-Put-g_humanplayers-and-g_needpass-in-server-info.patch
@@ -1,18 +1,16 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Wed, 11 Aug 2010 22:15:46 +0100
-Subject: [PATCH] Put g_humanplayers and g_needpass in server info
+From: Zack Middleton <ZTurtleMan>
+Date: Sat, 5 Feb 2011 13:21:30 +0000
+Subject: [PATCH] Add g_humansplayers (found by server) and g_needpass (cvar) to serverinfo
 
-OpenArena uses these in its UI, and they seem like useful things to know.
+Based on patches from OpenArena.
 
-Origin: OpenArena
 Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4702
-Forwarded: yes
 ---
  code/client/cl_main.c |    4 ++++
  code/client/cl_ui.c   |    2 ++
  code/client/client.h  |    2 ++
- code/server/sv_main.c |    2 ++
- 4 files changed, 10 insertions(+), 0 deletions(-)
+ code/server/sv_main.c |    9 +++++++--
+ 4 files changed, 15 insertions(+), 2 deletions(-)
 
 diff --git a/code/client/cl_main.c b/code/client/cl_main.c
 index 726ecfb..c966910 100644
@@ -63,16 +61,43 @@ index 7891a83..c105fb8 100644
  
  typedef struct {
 diff --git a/code/server/sv_main.c b/code/server/sv_main.c
-index 17afd3b..c9c346e 100644
+index 17afd3b..2e33aff 100644
 --- a/code/server/sv_main.c
 +++ b/code/server/sv_main.c
-@@ -662,6 +662,8 @@ void SVC_Info( netadr_t from ) {
- 	if( *gamedir ) {
- 		Info_SetValueForKey( infostring, "game", gamedir );
+@@ -605,7 +605,7 @@ if a user is interested in a server to do a full status
+ ================
+ */
+ void SVC_Info( netadr_t from ) {
+-	int		i, count;
++	int		i, count, humans;
+ 	char	*gamedir;
+ 	char	infostring[MAX_INFO_STRING];
+ 
+@@ -624,10 +624,13 @@ void SVC_Info( netadr_t from ) {
+ 		return;
+ 
+ 	// don't count privateclients
+-	count = 0;
++	count = humans = 0;
+ 	for ( i = sv_privateClients->integer ; i < sv_maxclients->integer ; i++ ) {
+ 		if ( svs.clients[i].state >= CS_CONNECTED ) {
+ 			count++;
++			if (svs.clients[i].netchan.remoteAddress.type != NA_BOT) {
++				humans++;
++			}
+ 		}
  	}
-+	Info_SetValueForKey( infostring, "g_needpass", va("%i", Cvar_VariableIntegerValue( "g_needpass" )));
-+	Info_SetValueForKey( infostring, "g_humanplayers", va("%i", Cvar_VariableIntegerValue( "g_humanplayers" )));
  
- 	NET_OutOfBandPrint( NS_SERVER, from, "infoResponse\n%s", infostring );
- }
--- 
+@@ -641,10 +644,12 @@ void SVC_Info( netadr_t from ) {
+ 	Info_SetValueForKey( infostring, "hostname", sv_hostname->string );
+ 	Info_SetValueForKey( infostring, "mapname", sv_mapname->string );
+ 	Info_SetValueForKey( infostring, "clients", va("%i", count) );
++	Info_SetValueForKey( infostring, "g_humanplayers", va("%i", humans ) );
+ 	Info_SetValueForKey( infostring, "sv_maxclients", 
+ 		va("%i", sv_maxclients->integer - sv_privateClients->integer ) );
+ 	Info_SetValueForKey( infostring, "gametype", va("%i", sv_gametype->integer ) );
+ 	Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
++	Info_SetValueForKey( infostring, "g_needpass", Cvar_VariableIntegerValue( "g_needpass" ));
+ 
+ #ifdef USE_VOIP
+ 	if (sv_voip->integer) {

-- 
Quake 3 engine



More information about the Pkg-games-commits mailing list