r4777 - in trunk/data: . maps maps/bloodprisonctf qcsrc/common qcsrc/menu/nexuiz qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 17 10:58:32 EDT 2008
Author: div0
Date: 2008-10-17 10:58:31 -0400 (Fri, 17 Oct 2008)
New Revision: 4777
Removed:
trunk/data/maps/bloodprisonctf/lm_0016.tga
trunk/data/maps/bloodprisonctf/lm_0017.tga
trunk/data/maps/bloodprisonctf/lm_0018.tga
trunk/data/maps/bloodprisonctf/lm_0019.tga
trunk/data/maps/bloodprisonctf/lm_0020.tga
trunk/data/maps/bloodprisonctf/lm_0021.tga
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/maps/bloodprisonctf.bsp
trunk/data/maps/bloodprisonctf.map.options
trunk/data/maps/bloodprisonctf/lm_0000.tga
trunk/data/maps/bloodprisonctf/lm_0001.tga
trunk/data/maps/bloodprisonctf/lm_0002.tga
trunk/data/maps/bloodprisonctf/lm_0003.tga
trunk/data/maps/bloodprisonctf/lm_0004.tga
trunk/data/maps/bloodprisonctf/lm_0005.tga
trunk/data/maps/bloodprisonctf/lm_0006.tga
trunk/data/maps/bloodprisonctf/lm_0007.tga
trunk/data/maps/bloodprisonctf/lm_0008.tga
trunk/data/maps/bloodprisonctf/lm_0009.tga
trunk/data/maps/bloodprisonctf/lm_0010.tga
trunk/data/maps/bloodprisonctf/lm_0011.tga
trunk/data/maps/bloodprisonctf/lm_0012.tga
trunk/data/maps/bloodprisonctf/lm_0013.tga
trunk/data/maps/bloodprisonctf/lm_0014.tga
trunk/data/maps/bloodprisonctf/lm_0015.tga
trunk/data/maps/dismal.mapinfo
trunk/data/qcsrc/common/mapinfo.qc
trunk/data/qcsrc/common/mapinfo.qh
trunk/data/qcsrc/menu/nexuiz/maplist.c
trunk/data/qcsrc/menu/nexuiz/util.qc
trunk/data/qcsrc/server/clientcommands.qc
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
Log:
add a way to hide maps from the menu in mapinfo (campaign should still be able to use them then)
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/defaultNexuiz.cfg 2008-10-17 14:58:31 UTC (rev 4777)
@@ -1158,3 +1158,5 @@
seta cl_teamradar_position "0 0" // 1 1 would be lower right corner, 0.5 0.5 the center (ARGH) :P
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 1 // allow hidden maps to be, e.g., voted for and in the maplist
Modified: trunk/data/maps/bloodprisonctf/lm_0000.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0001.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0002.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0003.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0004.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0005.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0006.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0007.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0008.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0009.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0010.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0011.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0012.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0013.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0014.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf/lm_0015.tga
===================================================================
(Binary files differ)
Deleted: trunk/data/maps/bloodprisonctf/lm_0016.tga
===================================================================
(Binary files differ)
Deleted: trunk/data/maps/bloodprisonctf/lm_0017.tga
===================================================================
(Binary files differ)
Deleted: trunk/data/maps/bloodprisonctf/lm_0018.tga
===================================================================
(Binary files differ)
Deleted: trunk/data/maps/bloodprisonctf/lm_0019.tga
===================================================================
(Binary files differ)
Deleted: trunk/data/maps/bloodprisonctf/lm_0020.tga
===================================================================
(Binary files differ)
Deleted: trunk/data/maps/bloodprisonctf/lm_0021.tga
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf.bsp
===================================================================
(Binary files differ)
Modified: trunk/data/maps/bloodprisonctf.map.options
===================================================================
--- trunk/data/maps/bloodprisonctf.map.options 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/maps/bloodprisonctf.map.options 2008-10-17 14:58:31 UTC (rev 4777)
@@ -1 +1 @@
--scale 1.2
+-scale 1:1.2
Modified: trunk/data/maps/dismal.mapinfo
===================================================================
--- trunk/data/maps/dismal.mapinfo 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/maps/dismal.mapinfo 2008-10-17 14:58:31 UTC (rev 4777)
@@ -11,3 +11,4 @@
type rune 200 20
type lms 9 20
cdtrack 7
+hidden
Modified: trunk/data/qcsrc/common/mapinfo.qc
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qc 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/common/mapinfo.qc 2008-10-17 14:58:31 UTC (rev 4777)
@@ -110,6 +110,7 @@
bufstr_set(_MapInfo_Cache_Buf_IndexToMapData, ++i, MapInfo_Map_author);
bufstr_set(_MapInfo_Cache_Buf_IndexToMapData, ++i, ftos(MapInfo_Map_supportedGametypes));
bufstr_set(_MapInfo_Cache_Buf_IndexToMapData, ++i, ftos(MapInfo_Map_supportedFeatures));
+ bufstr_set(_MapInfo_Cache_Buf_IndexToMapData, ++i, ftos(MapInfo_Map_flags));
}
float MapInfo_Cache_Retrieve(string map)
@@ -131,6 +132,7 @@
MapInfo_Map_author = bufstr_get(_MapInfo_Cache_Buf_IndexToMapData, ++i);
MapInfo_Map_supportedGametypes = stof(bufstr_get(_MapInfo_Cache_Buf_IndexToMapData, ++i));
MapInfo_Map_supportedFeatures = stof(bufstr_get(_MapInfo_Cache_Buf_IndexToMapData, ++i));
+ MapInfo_Map_flags = stof(bufstr_get(_MapInfo_Cache_Buf_IndexToMapData, ++i));
return 1;
}
@@ -164,7 +166,7 @@
return MapInfo_FilterList_Lookup(i);
}
-string MapInfo_FilterGametype_Recursive(float pGametype, float pFeatures, float pBegin, float pEnd, float pAbortOnGenerate)
+string MapInfo_FilterGametype_Recursive(float pGametype, float pFeatures, float pFlagsRequired, float pFlagsForbidden, float pBegin, float pEnd, float pAbortOnGenerate)
{
float m, valid;
string l, r;
@@ -183,8 +185,11 @@
MapInfo_progress = m / _MapInfo_globcount;
return string_null; // BAIL OUT
}
- valid = (((MapInfo_Map_supportedGametypes & pGametype) != 0) && ((MapInfo_Map_supportedFeatures & pFeatures) == pFeatures));
- r = MapInfo_FilterGametype_Recursive(pGametype, pFeatures, m + 1, pEnd, pAbortOnGenerate);
+ valid = (((MapInfo_Map_supportedGametypes & pGametype) != 0);
+ valid = valid && ((MapInfo_Map_supportedFeatures & pFeatures) == pFeatures));
+ valid = valid && (MapInfo_Map_flags & pFlagsForbidden == 0);
+ valid = valid && (MapInfo_Map_flags & pFlagsRequired == pFlagsRequired);
+ r = MapInfo_FilterGametype_Recursive(pGametype, pFeatures, pFlagsRequired, pFlagsForbidden, m + 1, pEnd, pAbortOnGenerate);
if not(r)
return string_null; // BAIL OUT
@@ -194,11 +199,11 @@
return HugeSetOfIntegers_concat(l, r);
}
-float MapInfo_FilterGametype(float pGametype, float pFeatures, float pAbortOnGenerate)
+float MapInfo_FilterGametype(float pGametype, float pFeatures, pFlagsRequired, pFlagsForbidden, float pAbortOnGenerate)
{
if(_MapInfo_filtered)
strunzone(_MapInfo_filtered);
- _MapInfo_filtered = MapInfo_FilterGametype_Recursive(pGametype, pFeatures, 0, _MapInfo_globcount, pAbortOnGenerate);
+ _MapInfo_filtered = MapInfo_FilterGametype_Recursive(pGametype, pFeatures, pFlagsRequired, pFlagsForbidden, 0, _MapInfo_globcount, pAbortOnGenerate);
if not(_MapInfo_filtered)
{
dprint("Autogenerated a .mapinfo, doing the rest later.\n");
@@ -226,7 +231,7 @@
return stof(bufstr_get(_MapInfo_filtered, i));
}
-float MapInfo_FilterGametype(float pGametype, float pFeatures, float pAbortOnGenerate)
+float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate)
{
float i, j;
if not(_MapInfo_filtered_allocated)
@@ -244,7 +249,10 @@
MapInfo_progress = i / _MapInfo_globcount;
return 0;
}
- if(((MapInfo_Map_supportedGametypes & pGametype) != 0) && ((MapInfo_Map_supportedFeatures & pFeatures) == pFeatures))
+ if((MapInfo_Map_supportedGametypes & pGametype) != 0)
+ if((MapInfo_Map_supportedFeatures & pFeatures) == pFeatures)
+ if((MapInfo_Map_flags & pFlagsForbidden) == 0)
+ if((MapInfo_Map_flags & pFlagsRequired) == pFlagsRequired)
bufstr_set(_MapInfo_filtered, ++j, ftos(i));
}
MapInfo_count = j + 1;
@@ -445,6 +453,7 @@
MapInfo_Map_author = "<AUTHOR>";
MapInfo_Map_supportedGametypes = 0;
MapInfo_Map_supportedFeatures = 0;
+ MapInfo_Map_flags = 0;
MapInfo_Map_clientstuff = "";
MapInfo_Map_fog = "";
MapInfo_Map_mins = '0 0 0';
@@ -568,6 +577,7 @@
fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
fputs(fh, "// optional: clientsettemp_for_type (all|gametypename) cvarname value\n");
fputs(fh, "// optional: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+ fputs(fh, "// optional: hidden\n");
fclose(fh);
r = 2;
@@ -607,6 +617,10 @@
else
dprint("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
}
+ else if(t == "hidden")
+ {
+ MapInfo_Map_flags |= MAPINFO_FLAG_HIDDEN;
+ }
else if(t == "type")
{
t = car(s); s = cdr(s);
@@ -865,14 +879,14 @@
localcmd(strcat("\nsettemp_restore\nchangelevel ", s, "\n"));
}
-string MapInfo_ListAllowedMaps()
+string MapInfo_ListAllowedMaps(float pRequiredFlags, float pForbiddenFlags)
{
string out;
float i;
// to make absolutely sure:
MapInfo_Enumerate();
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), pRequiredFlags, pForbiddenFlags, 0);
out = "";
for(i = 0; i < MapInfo_count; ++i)
Modified: trunk/data/qcsrc/common/mapinfo.qh
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qh 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/common/mapinfo.qh 2008-10-17 14:58:31 UTC (rev 4777)
@@ -13,6 +13,8 @@
float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps
+float MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
+
float MapInfo_count;
// info about a map that MapInfo loads
@@ -20,10 +22,11 @@
string MapInfo_Map_title;
string MapInfo_Map_description;
string MapInfo_Map_author;
-string MapInfo_Map_clientstuff;
-string MapInfo_Map_fog;
+string MapInfo_Map_clientstuff; // not in cache, only for map load
+string MapInfo_Map_fog; // not in cache, only for map load
float MapInfo_Map_supportedGametypes;
float MapInfo_Map_supportedFeatures;
+float MapInfo_Map_flags;
vector MapInfo_Map_mins; // these are '0 0 0' if not supported!
vector MapInfo_Map_maxs; // these are '0 0 0' if not specified!
@@ -33,7 +36,7 @@
// filter the info by game type mask (updates MapInfo_count)
float MapInfo_progress;
-float MapInfo_FilterGametype(float gametype, float features, float pAbortOnGenerate); // 1 on success, 0 on temporary failure (call it again next frame then; use MapInfo_progress as progress indicator)
+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
@@ -55,7 +58,7 @@
void MapInfo_LoadMap(string s);
// list all maps for the current game type
-string MapInfo_ListAllowedMaps();
+string MapInfo_ListAllowedMaps(float pFlagsRequired, float pFlagsForbidden);
// gets a gametype from a string
float MapInfo_Type_FromString(string t);
Modified: trunk/data/qcsrc/menu/nexuiz/maplist.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/maplist.c 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/menu/nexuiz/maplist.c 2008-10-17 14:58:31 UTC (rev 4777)
@@ -203,7 +203,7 @@
float gt, f;
gt = MapInfo_CurrentGametype();
f = MapInfo_CurrentFeatures();
- MapInfo_FilterGametype(gt, f, 0);
+ MapInfo_FilterGametype(gt, f, 0, MAPINFO_FLAG_HIDDEN, 0);
me.nItems = MapInfo_count;
for(i = 0; i < MapInfo_count; ++i)
draw_PreloadPicture(strcat("/maps/", MapInfo_BSPName_ByID(i)));
@@ -236,7 +236,7 @@
{
float i;
string s;
- MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0); // all
+ MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MAPINFO_FLAG_HIDDEN, 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 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/menu/nexuiz/util.qc 2008-10-17 14:58:31 UTC (rev 4777)
@@ -207,7 +207,7 @@
MapInfo_Cache_Create();
MapInfo_Enumerate();
- if(!MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 1))
+ if(!MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
{
draw_reset();
Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/server/clientcommands.qc 2008-10-17 14:58:31 UTC (rev 4777)
@@ -223,7 +223,7 @@
//float ctf_clientcommand();
void SV_ParseClientCommand(string s) {
local string cmd;
- local float i, tokens;
+ local float i, j, tokens;
tokens = tokenize_sane(s);
@@ -340,7 +340,7 @@
}
}
} else if(argv(0) == "maplist") {
- local float n, j;
+ local float n;
local string col;
n = tokenize_sane(cvar_string("g_maplist"));
sprint(self, "^7Maps in list: ");
@@ -359,13 +359,18 @@
sprint(self, "\n");
} else if(argv(0) == "lsmaps") {
sprint(self, "^7Maps available: ");
- for(i = 0; i < MapInfo_count; ++i)
+ for(i = 0, j = 0; i < MapInfo_count; ++i)
{
- if(mod(i, 2))
- col = "^2";
- else
- col = "^3";
- sprint(self, strcat(col, MapInfo_BSPName_ByID(i), " "));
+ if(MapInfo_Get_ByID(i))
+ if not(MapInfo_Map_flags & MAPINFO_FLAG_HIDDEN)
+ {
+ if(mod(i, 2))
+ col = "^2";
+ else
+ col = "^3";
+ ++j;
+ sprint(self, strcat(col, MapInfo_Map_bspname, " "));
+ }
}
sprint(self, "\n");
} else if(argv(0) == "voice") {
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/server/defs.qh 2008-10-17 14:58:31 UTC (rev 4777)
@@ -31,6 +31,7 @@
float g_pickup_respawntime_medium;
float g_pickup_respawntime_long;
float g_pickup_respawntime_powerup;
+float g_maplist_allow_hidden;
float sv_cheats;
float sv_gentle;
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/server/g_world.qc 2008-10-17 14:58:31 UTC (rev 4777)
@@ -143,7 +143,7 @@
cvar_set("nextmap", argv(0));
MapInfo_Enumerate();
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0), 0);
if(!DoNextMapOverride())
GotoNextMap();
@@ -356,7 +356,7 @@
orig_slowmo = cvar("slowmo");
MapInfo_Enumerate();
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 1);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0), 1);
if(whichpack(strcat("maps/", mapname, ".cfg")) != "")
{
@@ -681,7 +681,7 @@
if(Map_Count == 0)
{
bprint( "Maplist is empty! Resetting it to default map list.\n" );
- cvar_set("g_maplist", temp = MapInfo_ListAllowedMaps());
+ cvar_set("g_maplist", temp = MapInfo_ListAllowedMaps(0, MAPINFO_FLAG_HIDDEN));
localcmd("\nmenu_cmd sync\n");
Map_Count = tokenizebyseparator(temp, " ");
}
@@ -799,7 +799,7 @@
if(allowReset)
{
bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllowedMaps());
+ cvar_set("g_maplist", MapInfo_ListAllowedMaps(0, MAPINFO_FLAG_HIDDEN));
localcmd("\nmenu_cmd sync\n");
}
else
@@ -1805,7 +1805,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());
+ cvar_set("g_maplist", MapInfo_ListAllowedMaps(0, MAPINFO_FLAG_HIDDEN));
localcmd("\nmenu_cmd sync\n");
for(i = 0; i < 100 && mapvote_count < nmax; ++i)
MapVote_AddVotable(GetNextMap(), FALSE);
@@ -2180,7 +2180,7 @@
return;
MapInfo_Enumerate();
- if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 1))
+ if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0), 1))
mapvote_run = TRUE;
}
void MapVote_Think()
@@ -2319,7 +2319,7 @@
// Mapinfo
MapInfo_Shutdown();
MapInfo_Enumerate();
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 1);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0), 1);
}
void SV_Shutdown()
Modified: trunk/data/qcsrc/server/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/server/gamecommand.qc 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/server/gamecommand.qc 2008-10-17 14:58:31 UTC (rev 4777)
@@ -438,10 +438,10 @@
void make_mapinfo_Think()
{
- if(MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 1))
+ if(MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
{
print("Done rebuiling mapinfos.\n");
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0), 0);
remove(self);
}
else
@@ -527,16 +527,17 @@
if(t)
{
MapInfo_SwitchGameType(t);
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, MAPINFO_FLAG_HIDDEN, 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), 0);
}
else
{
bprint("Cannot use this game type: no map for it found\n");
MapInfo_SwitchGameType(tsave);
- MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0);
+ MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), 0, (g_maplist_allow_hidden ? MAPINFO_FLAG_HIDDEN : 0), 0);
}
}
else
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2008-10-17 13:57:21 UTC (rev 4776)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2008-10-17 14:58:31 UTC (rev 4777)
@@ -863,6 +863,7 @@
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");
inWarmupStage = cvar("g_warmup");
g_warmup_limit = cvar("g_warmup_limit");
More information about the nexuiz-commits
mailing list