r5407 - in trunk/data: . qcsrc/menu/nexuiz
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 5 06:01:30 EST 2009
Author: div0
Date: 2009-01-05 06:01:28 -0500 (Mon, 05 Jan 2009)
New Revision: 5407
Modified:
trunk/data/defaultHavoc.cfg
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/menu/nexuiz/serverlist.c
Log:
menu_slist_modfilter
Modified: trunk/data/defaultHavoc.cfg
===================================================================
--- trunk/data/defaultHavoc.cfg 2009-01-05 10:42:57 UTC (rev 5406)
+++ trunk/data/defaultHavoc.cfg 2009-01-05 11:01:28 UTC (rev 5407)
@@ -29,6 +29,7 @@
seta r_ambient 20
set g_projectiles_newton_style 0
seta menu_skin "simplygray"
+set menu_slist_modfilter "havoc"
exec physicsHavoc.cfg
exec weaponsHavoc.cfg
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2009-01-05 10:42:57 UTC (rev 5406)
+++ trunk/data/defaultNexuiz.cfg 2009-01-05 11:01:28 UTC (rev 5407)
@@ -1028,6 +1028,7 @@
// for menu server list (eventually make them have engine support?)
seta menu_slist_showfull 1
seta menu_slist_showempty 1
+set menu_slist_modfilter "!havoc"
// for menu weapon arena
set menu_weaponarena_with_laser 0
Modified: trunk/data/qcsrc/menu/nexuiz/serverlist.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/serverlist.c 2009-01-05 10:42:57 UTC (rev 5406)
+++ trunk/data/qcsrc/menu/nexuiz/serverlist.c 2009-01-05 11:01:28 UTC (rev 5407)
@@ -172,7 +172,7 @@
else */
{
float m, o;
- string s, typestr;
+ string s, typestr, modstr;
s = me.filterString;
m = strstrofs(s, ":", 0);
@@ -186,6 +186,8 @@
else
typestr = "";
+ modstr = cvar_string("menu_slist_modfilter");
+
m = SLIST_MASK_AND - 1;
resethostcachemasks();
if(!me.filterShowFull)
@@ -194,6 +196,13 @@
sethostcachemasknumber(++m, SLIST_FIELD_NUMHUMANS, 1, SLIST_TEST_GREATEREQUAL);
if(typestr != "")
sethostcachemaskstring(++m, SLIST_FIELD_QCSTATUS, strcat(typestr, ":"), SLIST_TEST_STARTSWITH);
+ if(modstr != "")
+ {
+ if(substring(modstr, 0, 1) == "!")
+ sethostcachemaskstring(++m, SLIST_FIELD_MOD, substring(modstr, 1, strlen(modstr) - 1), SLIST_TEST_NOTEQUAL);
+ else
+ sethostcachemaskstring(++m, SLIST_FIELD_MOD, modstr, SLIST_TEST_EQUAL);
+ }
m = SLIST_MASK_OR - 1;
if(s != "")
{
More information about the nexuiz-commits
mailing list