r2369 - in trunk/data/qcsrc/menu: base custom

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Apr 20 12:00:05 EDT 2007


Author: div0
Date: 2007-04-20 12:00:04 -0400 (Fri, 20 Apr 2007)
New Revision: 2369

Modified:
   trunk/data/qcsrc/menu/base/hostcache.qc
   trunk/data/qcsrc/menu/base/hostcache.qh
   trunk/data/qcsrc/menu/custom/joingame.qc
   trunk/data/qcsrc/menu/custom/joingame.qm
Log:
support the numbots field


Modified: trunk/data/qcsrc/menu/base/hostcache.qc
===================================================================
--- trunk/data/qcsrc/menu/base/hostcache.qc	2007-04-20 13:16:15 UTC (rev 2368)
+++ trunk/data/qcsrc/menu/base/hostcache.qc	2007-04-20 16:00:04 UTC (rev 2369)
@@ -12,6 +12,7 @@
 	SLIST_FIELD_MAXPLAYERS = gethostcacheindexforkey( "maxplayers" );
 	SLIST_FIELD_NUMPLAYERS = gethostcacheindexforkey( "numplayers" );
 	SLIST_FIELD_NUMHUMANS = gethostcacheindexforkey( "numhumans" );
+	SLIST_FIELD_NUMBOTS = gethostcacheindexforkey( "numbots" );
 	SLIST_FIELD_PROTOCOL = gethostcacheindexforkey( "protocol" );
 };
 

Modified: trunk/data/qcsrc/menu/base/hostcache.qh
===================================================================
--- trunk/data/qcsrc/menu/base/hostcache.qh	2007-04-20 13:16:15 UTC (rev 2368)
+++ trunk/data/qcsrc/menu/base/hostcache.qh	2007-04-20 16:00:04 UTC (rev 2369)
@@ -10,6 +10,7 @@
 float SLIST_FIELD_MAXPLAYERS;
 float SLIST_FIELD_NUMPLAYERS;
 float SLIST_FIELD_NUMHUMANS;
+float SLIST_FIELD_NUMBOTS;
 float SLIST_FIELD_PROTOCOL;
 
 float HostCache_ViewCount;

Modified: trunk/data/qcsrc/menu/custom/joingame.qc
===================================================================
--- trunk/data/qcsrc/menu/custom/joingame.qc	2007-04-20 13:16:15 UTC (rev 2368)
+++ trunk/data/qcsrc/menu/custom/joingame.qc	2007-04-20 16:00:04 UTC (rev 2369)
@@ -94,12 +94,13 @@
 void() Item_Nex_HostCache_Players_Update =
 {
 	local string lHum, lNum, lMax;
-	local float lHumans;
+	local float lHumans, lBots;
 
 	if( HostCache_ViewCount <= self._parent.stepValue )
 		return;
 	lHumans = gethostcachenumber( SLIST_FIELD_NUMHUMANS, self._parent.stepValue );
-	if (lHumans >= 0) lHum = ftos( lHumans ); else lHum = "?";
+	lBots = gethostcachenumber( SLIST_FIELD_NUMBOTS, self._parent.stepValue );
+	if (lBots >= 0) lHum = ftos( lHumans ); else lHum = "?";
 	lNum = ftos( gethostcachenumber( SLIST_FIELD_NUMPLAYERS, self._parent.stepValue ) );
 	lMax = ftos( gethostcachenumber( SLIST_FIELD_MAXPLAYERS, self._parent.stepValue ) );
 

Modified: trunk/data/qcsrc/menu/custom/joingame.qm
===================================================================
--- trunk/data/qcsrc/menu/custom/joingame.qm	2007-04-20 13:16:15 UTC (rev 2368)
+++ trunk/data/qcsrc/menu/custom/joingame.qm	2007-04-20 16:00:04 UTC (rev 2369)
@@ -170,6 +170,10 @@
 						lField = SLIST_FIELD_NUMPLAYERS;
 						lIsStringArg = false;
 					}
+					else if( lToken == "numbots" ) {
+						lField = SLIST_FIELD_NUMBOTS;
+						lIsStringArg = false;
+					}
 					else if( lToken == "numhumans" ) {
 						lField = SLIST_FIELD_NUMHUMANS;
 						lIsStringArg = false;




More information about the nexuiz-commits mailing list