[nexuiz-commits] r7155 - in trunk/data: . maps qcsrc/common qcsrc/menu/nexuiz qcsrc/server scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Jul 8 03:03:27 EDT 2009


Author: div0
Date: 2009-07-08 03:03:26 -0400 (Wed, 08 Jul 2009)
New Revision: 7155

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/maps/cyberparcour01.mapinfo
   trunk/data/qcsrc/common/gamecommand.qc
   trunk/data/qcsrc/common/mapinfo.qc
   trunk/data/qcsrc/common/mapinfo.qh
   trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
   trunk/data/qcsrc/menu/nexuiz/maplist.c
   trunk/data/qcsrc/menu/nexuiz/util.qc
   trunk/data/qcsrc/menu/nexuiz/util.qh
   trunk/data/qcsrc/server/constants.qh
   trunk/data/qcsrc/server/defs.qh
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/gamecommand.qc
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/scripts/entities.def
Log:
- add a "frustrating" flag to race maps in mapinfo so they are not playable by default
- set the flag on cyberparcour01


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/defaultNexuiz.cfg	2009-07-08 07:03:26 UTC (rev 7155)
@@ -24,7 +24,7 @@
 seta g_configversion 0	"Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
 
 // default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default 0c601dba9664e961890f080688357fff
+set cvar_check_default 5b1cce9cce2493c11499473c959bad8f
 
 // Nexuiz version (formatted for machines)
 // used to determine if a client version is compatible
@@ -1431,7 +1431,8 @@
 seta cl_teamradar_zoommode 0	"zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out"
 alias cl_teamradar_rotate "toggle cl_teamradar_rotation 0 1 2 3 4"
 
-set g_maplist_allow_hidden 0	"allow hidden maps to be, e.g., voted for and in the maplist"
+set g_maplist_allow_hidden 0		"allow hidden maps to be, e.g., voted for and in the maplist"
+set g_maplist_allow_frustrating 0	"allow impossible maps to be, e.g., voted for and in the maplist (if set to 2, ONLY impossible maps are allowed)"
 
 seta g_start_delay 0	"delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server"
 	if_dedicated set g_start_delay 15

Modified: trunk/data/maps/cyberparcour01.mapinfo
===================================================================
--- trunk/data/maps/cyberparcour01.mapinfo	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/maps/cyberparcour01.mapinfo	2009-07-08 07:03:26 UTC (rev 7155)
@@ -1,7 +1,7 @@
 title CyberParcour01
-description
+description A really frustrating race map
 author sev
 type race 5 20 15
+frustrating
 settemp_for_type race g_start_weapon_shotgun 0
 settemp_for_type race g_start_weapon_laser 0
-settemp_for_type race g_start_weapon_hook 0

Modified: trunk/data/qcsrc/common/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/common/gamecommand.qc	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/common/gamecommand.qc	2009-07-08 07:03:26 UTC (rev 7155)
@@ -250,11 +250,7 @@
 		else if(argv(1) == "cleanup")
 		{
 			MapInfo_Enumerate();
-			if(cvar("g_maplist_allow_hidden"))
-				i = MAPINFO_FLAG_FORBIDDEN;
-			else
-				i = MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN;
-			MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, i, 0);
+			MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 			n = tokenizebyseparator(cvar_string("g_maplist"), " ");
 			s2 = "";
 			for(i = 0; i < n; ++i)

Modified: trunk/data/qcsrc/common/mapinfo.qc
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qc	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/common/mapinfo.qc	2009-07-08 07:03:26 UTC (rev 7155)
@@ -246,6 +246,7 @@
 	float r;
 	float twoBaseModes;
 	float diameter, spawnpoints;
+	float spawnplaces;
 
 	vector mapMins, mapMaxs;
 
@@ -263,8 +264,10 @@
 	print("Analyzing ", fn, " to generate initial mapinfo; please edit that file later\n");
 
 	inWorldspawn = 2;
+	MapInfo_Map_flags = 0;
 	MapInfo_Map_supportedGametypes = 0;
 	spawnpoints = 0;
+	spawnplaces = 0;
 	_MapInfo_Map_worldspawn_music = "";
 
 	for(;;)
@@ -312,6 +315,15 @@
 				mapMaxs_y = max(mapMaxs_y, o_y);
 				mapMaxs_z = max(mapMaxs_z, o_z);
 			}
+			else if(k == "race_place")
+			{
+				if(v == "1")
+					spawnplaces |= 1;
+				else if(v == "2")
+					spawnplaces |= 2;
+				else if(v == "3")
+					spawnplaces |= 4;
+			}
 			else if(k == "classname")
 			{
 				if(v == "dom_controlpoint")
@@ -374,6 +386,10 @@
 			MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_KEYHUNT;
 	}
 
+	if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE)
+		if(spawnplaces != 7)
+			MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
+
 	dprint("-> diameter ",    ftos(diameter));
 	dprint(";  spawnpoints ", ftos(spawnpoints));
 	dprint(";  modes ",       ftos(MapInfo_Map_supportedGametypes), "\n");
@@ -530,10 +546,12 @@
 			}
 			fputs(fh, strcat("cdtrack ", ftos(i + 1), "\n"));
 		}
-		if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS)    
+		if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS)
 			fputs(fh, "has weapons\n");
 		else
 			fputs(fh, "// uncomment this if you added weapon pickups: has weapons\n");
+		if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
+			fputs(fh, "frustrating\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH)      fputs(fh, "type dm 30 20\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH) fputs(fh, "type tdm 50 20 2\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DOMINATION)      fputs(fh, "type dom 200 20\n");
@@ -606,6 +624,10 @@
 		{
 			MapInfo_Map_flags |= MAPINFO_FLAG_FORBIDDEN;
 		}
+		else if(t == "frustrating")
+		{
+			MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
+		}
 		else if(t == "type")
 		{
 			t = car(s); s = cdr(s);
@@ -950,3 +972,30 @@
 		_MapInfo_globopen = FALSE;
 	}
 }
+
+float MapInfo_ForbiddenFlags()
+{
+	float f;
+	f = MAPINFO_FLAG_FORBIDDEN;
+
+#ifndef MENUQC
+	if not(cvar("g_maplist_allow_hidden"))
+#endif
+		f |= MAPINFO_FLAG_HIDDEN;
+
+	if not(cvar("g_maplist_allow_frustrating"))
+		f |= MAPINFO_FLAG_FRUSTRATING;
+
+	return f;
+}
+
+float MapInfo_RequiredFlags()
+{
+	float f;
+	f = 0;
+
+	if(cvar("g_maplist_allow_frustrating") > 1)
+		f |= MAPINFO_FLAG_FRUSTRATING;
+
+	return f;
+}

Modified: trunk/data/qcsrc/common/mapinfo.qh
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qh	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/common/mapinfo.qh	2009-07-08 07:03:26 UTC (rev 7155)
@@ -16,6 +16,7 @@
 
 float MAPINFO_FLAG_HIDDEN           = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
 float MAPINFO_FLAG_FORBIDDEN        = 2; // don't even allow the map by a cvar setting that allows hidden maps
+float MAPINFO_FLAG_FRUSTRATING      = 4; // this map is near impossible to play, enable at your own risk
 
 float MapInfo_count;
 
@@ -41,6 +42,8 @@
 float MapInfo_FilterGametype(float gametype, float features, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate); // 1 on success, 0 on temporary failure (call it again next frame then; use MapInfo_progress as progress indicator)
 float MapInfo_CurrentFeatures(); // retrieves currently required features from cvars
 float MapInfo_CurrentGametype(); // retrieves current gametype from cvars
+float MapInfo_ForbiddenFlags(); // retrieves current flags from cvars
+float MapInfo_RequiredFlags(); // retrieves current flags from cvars
 
 // load info about the i-th map into the MapInfo_Map_* globals
 float MapInfo_Get_ByID(float i); // 1 on success, 0 on failure

Modified: trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-07-08 07:03:26 UTC (rev 7155)
@@ -66,10 +66,12 @@
 		}
 	me.TR(me);
 	me.TR(me);
-		me.TD(me, 1, 3, e = makeNexuizTextLabel(0, "Map list:"));
+		me.mapListBox = makeNexuizMapList();
+		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Map list:"));
+		me.TD(me, 1, 2, e = makeNexuizCheckBox(0, "g_maplist_allow_frustrating", "Show frustrating maps"));
+			makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
 	me.TR(me);
-		me.TD(me, me.rows - 7, 3, e = makeNexuizMapList());
-		me.mapListBox = e;
+		me.TD(me, me.rows - 7, 3, me.mapListBox);
 	me.gotoRC(me, me.rows - 3, 0);
 		me.TDempty(me, 0.5);
 		me.TD(me, 1, 1, e = makeNexuizButton("All", '0 0 0'));

Modified: trunk/data/qcsrc/menu/nexuiz/maplist.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/maplist.c	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/menu/nexuiz/maplist.c	2009-07-08 07:03:26 UTC (rev 7155)
@@ -7,6 +7,7 @@
 	METHOD(NexuizMapList, clickListBoxItem, void(entity, float, vector))
 	METHOD(NexuizMapList, resizeNotify, void(entity, vector, vector, vector, vector))
 	METHOD(NexuizMapList, refilter, void(entity))
+	METHOD(NexuizMapList, refilterCallback, void(entity, entity))
 	METHOD(NexuizMapList, keyDown, float(entity, float, float, float))
 
 	ATTRIB(NexuizMapList, realFontSize, vector, '0 0 0')
@@ -201,7 +202,7 @@
 	float gt, f;
 	gt = MapInfo_CurrentGametype();
 	f = MapInfo_CurrentFeatures();
-	MapInfo_FilterGametype(gt, f, 0, MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN, 0);
+	MapInfo_FilterGametype(gt, f, MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 	me.nItems = MapInfo_count;
 	for(i = 0; i < MapInfo_count; ++i)
 		draw_PreloadPicture(strcat("/maps/", MapInfo_BSPName_ByID(i)));
@@ -230,11 +231,16 @@
 	}
 }
 
+void refilterCallbackNexuizMapList(entity me, entity cb)
+{
+	me.refilter(me);
+}
+
 void MapList_All(entity btn, entity me)
 {
 	float i;
 	string s;
-	MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN, 0); // all
+	MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_FORBIDDEN, 0); // all
 	s = "";
 	for(i = 0; i < MapInfo_count; ++i)
 		s = strcat(s, " ", MapInfo_BSPName_ByID(i));

Modified: trunk/data/qcsrc/menu/nexuiz/util.qc
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/util.qc	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/menu/nexuiz/util.qc	2009-07-08 07:03:26 UTC (rev 7155)
@@ -67,7 +67,6 @@
 	for(i = 0; i < n; ++i)
 		cvar_set(argv(i), s);
 }
-
 void makeMulti(entity e, string otherCvars)
 {
 	e.cvarNames_Multi = otherCvars;
@@ -75,6 +74,22 @@
 	e.saveCvars = saveCvarsMulti;
 }
 
+.void(entity me) saveCvars_Callback;
+.entity saveCvars_Callback_ent;
+.void(entity me, entity cb) saveCvars_Callback_func;
+void saveCvarsCallback(entity me)
+{
+	me.saveCvars_Callback(me);
+	me.saveCvars_Callback_func(me.saveCvars_Callback_ent, me);
+}
+void makeCallback(entity e, entity cbent, void(entity, entity) cbfunc)
+{
+	e.saveCvars_Callback = e.saveCvars;
+	e.saveCvars = saveCvarsCallback;
+	e.saveCvars_Callback_ent = cbent;
+	e.saveCvars_Callback_func = cbfunc;
+}
+
 .void(entity) draw_setDependent;
 .string cvar_setDependent;
 .float cvarMin_setDependent;

Modified: trunk/data/qcsrc/menu/nexuiz/util.qh
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/util.qh	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/menu/nexuiz/util.qh	2009-07-08 07:03:26 UTC (rev 7155)
@@ -3,6 +3,7 @@
 void loadAllCvars(entity root);
 
 void makeMulti(entity me, string otherCvars);
+void makeCallback(entity me, entity cbent, void(entity, entity) cbfunc);
 
 void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax);
 void setDependentAND(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);

Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/server/constants.qh	2009-07-08 07:03:26 UTC (rev 7155)
@@ -1,4 +1,4 @@
-string CVAR_CHECK_DEFAULT = "0c601dba9664e961890f080688357fff";
+string CVAR_CHECK_DEFAULT = "5b1cce9cce2493c11499473c959bad8f";
 string CVAR_CHECK_WEAPONS = "4f7b4c1e2feeef4988b02a93ff35a2ca";
 
 float	FALSE					= 0;

Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/server/defs.qh	2009-07-08 07:03:26 UTC (rev 7155)
@@ -39,7 +39,6 @@
 float g_pickup_respawntimejitter_medium;
 float g_pickup_respawntimejitter_long;
 float g_pickup_respawntimejitter_powerup;
-float g_maplist_allow_hidden;
 float g_jetpack;
 
 float sv_clones;

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/server/g_world.qc	2009-07-08 07:03:26 UTC (rev 7155)
@@ -150,7 +150,7 @@
 		cvar_set("g_maplist_index", ftos(n - 1)); // jump to map 0 in GotoNextMap
 
 		MapInfo_Enumerate();
-		MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN) | MAPINFO_FLAG_FORBIDDEN, 0);
+		MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 
 		if(!DoNextMapOverride())
 			GotoNextMap();
@@ -364,9 +364,8 @@
 
 	self.classname = "worldspawn"; // safeguard against various stuff ;)
 
-	g_maplist_allow_hidden = cvar("g_maplist_allow_hidden");
 	MapInfo_Enumerate();
-	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN) | MAPINFO_FLAG_FORBIDDEN, 0);
+	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 }
 
 void Map_MarkAsRecent(string m);
@@ -548,7 +547,7 @@
 	Ban_LoadBans();
 
 	MapInfo_Enumerate();
-	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN) | MAPINFO_FLAG_FORBIDDEN, 1);
+	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1);
 
 	if(whichpack(strcat("maps/", mapname, ".cfg")) != "")
 	{
@@ -915,7 +914,7 @@
 	if(Map_Count == 0)
 	{
 		bprint( "Maplist is empty!  Resetting it to default map list.\n" );
-		cvar_set("g_maplist", MapInfo_ListAllowedMaps(0, MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN));
+		cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
 		if(cvar("g_maplist_shuffle"))
 			ShuffleMaplist();
 		localcmd("\nmenu_cmd sync\n");
@@ -1035,7 +1034,7 @@
 			if(allowReset)
 			{
 				bprint( "Maplist contains no single playable map!  Resetting it to default map list.\n" );
-				cvar_set("g_maplist", MapInfo_ListAllowedMaps(0, MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN));
+				cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
 				if(cvar("g_maplist_shuffle"))
 					ShuffleMaplist();
 				localcmd("\nmenu_cmd sync\n");
@@ -2076,7 +2075,7 @@
 	if(mapvote_count == 0)
 	{
 		bprint( "Maplist contains no single playable map!  Resetting it to default map list.\n" );
-		cvar_set("g_maplist", MapInfo_ListAllowedMaps(0, MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN));
+		cvar_set("g_maplist", MapInfo_ListAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
 		if(cvar("g_maplist_shuffle"))
 			ShuffleMaplist();
 		localcmd("\nmenu_cmd sync\n");
@@ -2404,7 +2403,7 @@
 		return;
 
 	MapInfo_Enumerate();
-	if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN) | MAPINFO_FLAG_FORBIDDEN, 1))
+	if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1))
 		mapvote_run = TRUE;
 }
 void MapVote_Think()
@@ -2543,7 +2542,7 @@
 	// Mapinfo
 	MapInfo_Shutdown();
 	MapInfo_Enumerate();
-	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? 0 : MAPINFO_FLAG_HIDDEN) | MAPINFO_FLAG_FORBIDDEN, 1);
+	MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1);
 }
 
 void SV_Shutdown()

Modified: trunk/data/qcsrc/server/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/server/gamecommand.qc	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/server/gamecommand.qc	2009-07-08 07:03:26 UTC (rev 7155)
@@ -564,7 +564,7 @@
 	if(MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
 	{
 		print("Done rebuiling mapinfos.\n");
-		MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0) | MAPINFO_FLAG_FORBIDDEN, 0);
+		MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 		remove(self);
 	}
 	else
@@ -652,17 +652,16 @@
 		if(t)
 		{
 			MapInfo_SwitchGameType(t);
-			MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, MAPINFO_FLAG_HIDDEN | MAPINFO_FLAG_FORBIDDEN, 0);
+			MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 			if(MapInfo_count > 0)
 			{
 				bprint("Game type successfully switched to ", s, "\n");
-				MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0) | MAPINFO_FLAG_FORBIDDEN, 0);
 			}
 			else
 			{
 				bprint("Cannot use this game type: no map for it found\n");
 				MapInfo_SwitchGameType(tsave);
-				MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0) | MAPINFO_FLAG_FORBIDDEN, 0);
+				MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
 			}
 		}
 		else

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2009-07-08 07:03:26 UTC (rev 7155)
@@ -1044,7 +1044,6 @@
     sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
     sv_pogostick = cvar("sv_pogostick");
     sv_doublejump = cvar("sv_doublejump");
-    g_maplist_allow_hidden = cvar("g_maplist_allow_hidden");
     g_ctf_reverse = cvar("g_ctf_reverse");
 
     inWarmupStage = cvar("g_warmup");

Modified: trunk/data/scripts/entities.def
===================================================================
--- trunk/data/scripts/entities.def	2009-07-08 05:48:04 UTC (rev 7154)
+++ trunk/data/scripts/entities.def	2009-07-08 07:03:26 UTC (rev 7155)
@@ -1240,7 +1240,7 @@
 target: this should point to a trigger_race_checkpoint to decide when this spawning point is active. The checkpoint has to be AFTER this spawn.
 target2: trigger all entities with this targetname when someone spawns
 cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1.
-race_place: if target points to the trigger_race_checkpoint with cnt 0 (finish line), this sets which place the spawn corresponds to; the special value 0 stands for spawns for players who come in later (have to be behind the ones with race_place set to an actual place), and -1 marks the spawnpoint for qualifying mode only
+race_place: if target points to the trigger_race_checkpoint with cnt 0 (finish line), this sets which place the spawn corresponds to; the special value 0 stands for spawns for players who come in later (have to be behind the ones with race_place set to an actual place), and -1 marks the spawnpoint for qualifying mode only; any race map must have spawnpoints with race_place being 1, 2, 3 or it gets marked as a frustrating map
 restriction: when 1, only bots can spawn here; when 2, only humans can spawn here (be careful with these, or the game will crash because someone cannot spawn)
 */
 



More information about the nexuiz-commits mailing list