]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into martin-t/AMMO
authorMartin Taibr <taibr.martin@gmail.com>
Mon, 2 Sep 2019 21:15:35 +0000 (23:15 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Mon, 2 Sep 2019 21:15:35 +0000 (23:15 +0200)
.gitlab-ci.yml
qcsrc/server/autocvars.qh
qcsrc/server/g_world.qc
xonotic-server.cfg

index 094013796d99ccc391e7d134aac75687d0cc615f..aab35300df1fe15c319c47fb0317d91945627bc6 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=0a8b491cd50a1e77d930b048c98da88f
+    - EXPECT=1de7606cb60c2057c59578c1b7a6bdfd
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 4b71e28e8b4e74153e93bbf5c07f8a2497b9c692..b14eb0c8079cf837168c1f20f26c62ae7a8ead9f 100644 (file)
@@ -157,6 +157,7 @@ bool autocvar_g_maplist_votable_suggestions;
 bool autocvar_g_maplist_votable_suggestions_override_mostrecent;
 float autocvar_g_maplist_votable_timeout;
 bool autocvar_g_maplist_ignore_sizes;
+bool autocvar_g_maplist_sizes_count_bots = true;
 int autocvar_g_maxplayers;
 float autocvar_g_maxplayers_spectator_blocktime;
 float autocvar_g_maxpushtime;
index 814b70e7e144f3ba9d81f0d9b4976fee923501c4..b02e4b86990036feebc33e4795847fb3df4fdaf7 100644 (file)
@@ -293,6 +293,8 @@ void cvar_changes_init()
                BADCVAR("teamplay");
                BADCVAR("timelimit");
                BADCVAR("g_mapinfo_ignore_warnings");
+               BADCVAR("g_maplist_ignore_sizes");
+               BADCVAR("g_maplist_sizes_count_bots");
 
                // long
                BADCVAR("hostname");
@@ -406,6 +408,7 @@ void cvar_changes_init()
                BADCVAR("g_ban_sync_uri");
                BADCVAR("g_buffs");
                BADCVAR("g_ca_teams_override");
+               BADCVAR("g_ctf_fullbrightflags");
                BADCVAR("g_ctf_ignore_frags");
                BADCVAR("g_ctf_leaderboard");
                BADCVAR("g_domination_point_limit");
@@ -1049,18 +1052,21 @@ bool MapHasRightSize(string map)
        // open map size restriction file
        string opensize_msg = strcat("opensize ", map);
        float fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
+       int pcount = player_count;
+       if(!autocvar_g_maplist_sizes_count_bots)
+               pcount -= currentbots;
        if(fh >= 0)
        {
                opensize_msg = strcat(opensize_msg, ": ok, ");
                int mapmin = stoi(fgets(fh));
                int mapmax = stoi(fgets(fh));
                fclose(fh);
-               if(player_count < mapmin)
+               if(pcount < mapmin)
                {
                        LOG_TRACE(opensize_msg, "not enough");
                        return false;
                }
-               if(mapmax && player_count > mapmax)
+               if(mapmax && pcount > mapmax)
                {
                        LOG_TRACE(opensize_msg, "too many");
                        return false;
index 59a455b6a3cf20d4dcce8282c5c2f3de34fd3942..13f790714f96ecaa413cc4f0af9f0f293576c7a8 100644 (file)
@@ -213,6 +213,7 @@ set g_maplist_selectrandom 0        "if 1, a random map will be chosen as next map - DE
 set g_maplist_shuffle 1        "new randomization method: like selectrandom, but avoid playing the same maps in short succession. This works by taking out the first element and inserting it into g_maplist with a bias to the end of the list"
 set g_maplist_check_waypoints 0        "when 1, maps are skipped if there currently are bots, but the map has no waypoints"
 set g_maplist_ignore_sizes 0 "when 1, all maps are shown in the map list regardless of player count"
+set g_maplist_sizes_count_bots 1 "include the number of bots currently in the server when counting the number of players for size restrictions"
 
 set g_items_mindist 4000 "starting distance for the fading of items"
 set g_items_maxdist 4500 "maximum distance at which an item can be viewed, after which it will be invisible"