Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_mapvoting.qh
Go to the documentation of this file.
1#pragma once
2
3#include "mapvoting.qh"
4
5#define autocvar_g_maplist cvar_string("g_maplist")
12#define autocvar_g_maplist_votable cvar("g_maplist_votable")
34
35// Definitions for functions used outside sv_mapvoting.qc
36void MapVote_Start();
37void MapVote_Think();
38bool GameTypeVote_SetGametype(Gametype type, string gametype_string, bool call_hooks);
39float GameTypeVote_Start();
40float GameTypeVote_Finished(int pos);
41string GameTypeVote_MapInfo_FixName(string m);
42
43// Globals, beyond those in mapvoting.qh
48// Suggestions need mv_suggestions (can't use mv_entries, since it's shared by gametype voting so will be overridden)
53/* NOTE: mv_rng array can be replaced with a randomly selected index of the tie-winner.
54 * If the tie-winner isn't included in the tie, choose the nearest index that is included.
55 * This would use less storage but isn't truly random and can sometimes be predictable.
56 */
60
65
float mv_winner_time
bool gametypevote
const int MAPVOTE_COUNT
Max number of votable maps/gametypes.
Definition mapvoting.qh:6
Gametype match_gametype
Gametype voted_gametype
float autocvar_g_maplist_shuffle
string GameTypeVote_MapInfo_FixName(string m)
bool autocvar_g_maplist_check_waypoints
float mv_rng[MAPVOTE_COUNT]
(shared) random() value for each map/gametype to determine tiebreakers
bool autocvar_sv_vote_gametype
int autocvar_g_maplist_votable_detail
bool mapvote_initialized
bool GameTypeVote_SetGametype(Gametype type, string gametype_string, bool call_hooks)
float autocvar_sv_vote_gametype_reduce_time
string autocvar_g_maplist_votable_screenshot_dir
int autocvar_g_maplist_index
int autocvar_g_maplist_mostrecent_count
bool autocvar_g_maplist_sizes_count_maxplayers
float GameTypeVote_Finished(int pos)
int mv_ranked[MAPVOTE_COUNT]
(shared) maps/gametypes ranked by most votes, first = most
int mv_reduce_count
void MapVote_Think()
string mv_pakfile[MAPVOTE_COUNT]
(maps) pk3 file location
string voted_gametype_string
float autocvar_sv_vote_gametype_timeout
bool autocvar_g_maplist_votable_suggestions_override_mostrecent
bool autocvar_g_maplist_votable_show_suggester
int mv_suggestion_ptr
(maps) index of where the next suggestion should be (starts as 0)
bool autocvar_g_maplist_ignore_sizes
bool autocvar_sv_vote_gametype_maplist_reset
int mv_voters
(shared) number of human voters present
string autocvar_sv_vote_gametype_options
float autocvar_g_maplist_votable_timeout
bool mv_show_suggester
(maps) whether to show suggesters, only for maps since you can't suggest gametypes
bool autocvar_g_maplist_votable_suggestions
float GameTypeVote_Start()
bool autocvar_sv_vote_gametype_default_current
int autocvar_g_maplist_votable_reduce_count
string mv_suggestions[MAPVOTE_COUNT]
(maps) name of the suggested map, later copied into mv_entries
bool autocvar_g_maplist_votable_abstain
int autocvar_rescan_pending
int autocvar_sv_vote_gametype_reduce_count
bool autocvar_g_maplist_sizes_count_bots
float autocvar_g_maplist_votable_reduce_time
bool mapvote_run
string getmapname_stored
int mv_ssdir_i[MAPVOTE_COUNT]
(shared) where to look for screenshots (mv_ssdirs index), set to 0 for gametype voting
int mapvote
void MapVote_Start()
int autocvar_sv_vote_gametype_detail
string autocvar_g_maplist_mostrecent
bool autocvar_g_maplist_selectrandom