Map list fixes
Fix GUI map voting with g_maplist_shuffle <= 0 && g_maplist_selectrandom 0
MaplistMethod_Iterate() returned the same map every time because Map_Current wasn't updated.
Documents g_maplist_shuffle -1
.
g_maplist: refactor initialisation
Reduces code duplication.
Checks/initialises once when adding maps to the voting screen, instead of doing it again for each map added.
Always uses gametype-specific g_maplist
generation, instead of sometimes
including maps from other gametypes (depending which code path was used).
Updates some declarations and removes an unused global.
gametype
command, as well as GUI gametype voting
g_maplist: update with This fixes the need to manually set g_maplist
to ""
after running the
gametype
command on a votable server.
This is consistent with GUI gametype voting (sv_vote_gametype 1) behaviour and shares its code to reduce duplication.
noautomaplist
flag to donotwant
mapinfo: fix and rename This flag was ignored in the code paths used on most servers, and its name and behaviour were not ideal for its intended use; see 7d48e976 description which seems clear that it's for allowing a certain kind of map to be available on the server but not be included in the usual voting pool.
This updated implementation omits the flagged maps from GUI voting and prevents them being selected by other GotoNextMap()/GetNextMap() code paths, unless there aren't enough viable maps in which case they can still be used as fallbacks.
The flagged maps are always listed in CLI and may be nominated with
suggestmap
or vcalled with gotomap
or nextmap
.