From bb8e08e9bf0753ee8aab1084489deeddc6cb11e2 Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 8 Jul 2009 07:03:26 +0000 Subject: [PATCH] - add a "frustrating" flag to race maps in mapinfo so they are not playable by default - set the flag on cyberparcour01 git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7155 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/defaultNexuiz.cfg | 5 +- data/maps/cyberparcour01.mapinfo | 4 +- data/qcsrc/common/gamecommand.qc | 6 +-- data/qcsrc/common/mapinfo.qc | 51 ++++++++++++++++++- data/qcsrc/common/mapinfo.qh | 3 ++ .../menu/nexuiz/dialog_multiplayer_create.c | 8 +-- data/qcsrc/menu/nexuiz/maplist.c | 10 +++- data/qcsrc/menu/nexuiz/util.qc | 17 ++++++- data/qcsrc/menu/nexuiz/util.qh | 1 + data/qcsrc/server/constants.qh | 2 +- data/qcsrc/server/defs.qh | 1 - data/qcsrc/server/g_world.qc | 17 +++---- data/qcsrc/server/gamecommand.qc | 7 ++- data/qcsrc/server/miscfunctions.qc | 1 - data/scripts/entities.def | 2 +- 15 files changed, 102 insertions(+), 33 deletions(-) diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index de4c978c9..5c3430f07 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -24,7 +24,7 @@ alias if_dedicated "_detect_dedicated_$qport $*" 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_position "1 0" "1 0 would be upper right corner, 0.5 0.5 the c 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 diff --git a/data/maps/cyberparcour01.mapinfo b/data/maps/cyberparcour01.mapinfo index d1afd47b7..1729757b4 100644 --- a/data/maps/cyberparcour01.mapinfo +++ b/data/maps/cyberparcour01.mapinfo @@ -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 diff --git a/data/qcsrc/common/gamecommand.qc b/data/qcsrc/common/gamecommand.qc index fed15a39d..e175d4d76 100644 --- a/data/qcsrc/common/gamecommand.qc +++ b/data/qcsrc/common/gamecommand.qc @@ -250,11 +250,7 @@ float GameCommand_Generic(string command) 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) diff --git a/data/qcsrc/common/mapinfo.qc b/data/qcsrc/common/mapinfo.qc index 309b804b0..fa82498a1 100644 --- a/data/qcsrc/common/mapinfo.qc +++ b/data/qcsrc/common/mapinfo.qc @@ -246,6 +246,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp float r; float twoBaseModes; float diameter, spawnpoints; + float spawnplaces; vector mapMins, mapMaxs; @@ -263,8 +264,10 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp 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 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp 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 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp 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 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype } 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 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype { 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 @@ void MapInfo_Shutdown() _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; +} diff --git a/data/qcsrc/common/mapinfo.qh b/data/qcsrc/common/mapinfo.qh index ba0a5fa41..abe6645b6 100644 --- a/data/qcsrc/common/mapinfo.qh +++ b/data/qcsrc/common/mapinfo.qh @@ -16,6 +16,7 @@ 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_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_progress; 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 diff --git a/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c b/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c index fee566861..96c72acb4 100644 --- a/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c +++ b/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c @@ -66,10 +66,12 @@ void fillNexuizServerCreateTab(entity me) } 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')); diff --git a/data/qcsrc/menu/nexuiz/maplist.c b/data/qcsrc/menu/nexuiz/maplist.c index 0be58be08..de73d7829 100644 --- a/data/qcsrc/menu/nexuiz/maplist.c +++ b/data/qcsrc/menu/nexuiz/maplist.c @@ -7,6 +7,7 @@ CLASS(NexuizMapList) EXTENDS(NexuizListBox) 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 @@ void refilterNexuizMapList(entity me) 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 refilterNexuizMapList(entity me) } } +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)); diff --git a/data/qcsrc/menu/nexuiz/util.qc b/data/qcsrc/menu/nexuiz/util.qc index a92725b86..6212773cf 100644 --- a/data/qcsrc/menu/nexuiz/util.qc +++ b/data/qcsrc/menu/nexuiz/util.qc @@ -67,7 +67,6 @@ void saveCvarsMulti(entity me) 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 @@ void makeMulti(entity e, string otherCvars) 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; diff --git a/data/qcsrc/menu/nexuiz/util.qh b/data/qcsrc/menu/nexuiz/util.qh index c74abc4b2..6d7e42665 100644 --- a/data/qcsrc/menu/nexuiz/util.qh +++ b/data/qcsrc/menu/nexuiz/util.qh @@ -3,6 +3,7 @@ void saveAllCvars(entity root); 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); diff --git a/data/qcsrc/server/constants.qh b/data/qcsrc/server/constants.qh index 7250f5478..405fd2798 100644 --- a/data/qcsrc/server/constants.qh +++ b/data/qcsrc/server/constants.qh @@ -1,4 +1,4 @@ -string CVAR_CHECK_DEFAULT = "0c601dba9664e961890f080688357fff"; +string CVAR_CHECK_DEFAULT = "5b1cce9cce2493c11499473c959bad8f"; string CVAR_CHECK_WEAPONS = "4f7b4c1e2feeef4988b02a93ff35a2ca"; float FALSE = 0; diff --git a/data/qcsrc/server/defs.qh b/data/qcsrc/server/defs.qh index 42ec51b38..11bbec3e3 100644 --- a/data/qcsrc/server/defs.qh +++ b/data/qcsrc/server/defs.qh @@ -39,7 +39,6 @@ float g_pickup_respawntimejitter_short; 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; diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index 0e69b51c1..a538d1ef3 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -150,7 +150,7 @@ void GotoFirstMap() 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 @@ void spawnfunc___init_dedicated_server(void) 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 @@ void spawnfunc_worldspawn (void) 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 @@ void Maplist_Init() 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 @@ void GotoNextMap() 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 @@ void MapVote_Init() 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 @@ void MapVote_Start() 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 @@ void RestoreGame() // 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() diff --git a/data/qcsrc/server/gamecommand.qc b/data/qcsrc/server/gamecommand.qc index 9beae00af..2eeca6680 100644 --- a/data/qcsrc/server/gamecommand.qc +++ b/data/qcsrc/server/gamecommand.qc @@ -564,7 +564,7 @@ void make_mapinfo_Think() 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 @@ void GameCommand(string command) 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 diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index f86a6ae44..342d85bf7 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -1044,7 +1044,6 @@ void readlevelcvars(void) 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"); diff --git a/data/scripts/entities.def b/data/scripts/entities.def index 518fb9112..bc180e140 100644 --- a/data/scripts/entities.def +++ b/data/scripts/entities.def @@ -1240,7 +1240,7 @@ NOTE for race_place: when the race starts after the qualifying, the player with 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) */ -- 2.39.2