From: Mario Date: Mon, 2 Sep 2019 06:14:16 +0000 (+1000) Subject: Add an option to count bots when getting the size restrictions on maps (enabled by... X-Git-Tag: xonotic-v0.8.5~1330 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c54e0a14333c815f8d3b50a36241c2bb6a2c6db2;p=xonotic%2Fxonotic-data.pk3dir.git Add an option to count bots when getting the size restrictions on maps (enabled by default - old behaviour) --- diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 4b71e28e8..b14eb0c80 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 814b70e7e..de94702f6 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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"); @@ -1049,6 +1051,9 @@ 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, "); diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 158b32ecd..f914a7b11 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -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"