]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/command/vote.qh
Merge remote branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qh
1 // ================================================
2 //  Declarations for the vote system/vote commands
3 //  Last updated: December 14th, 2011
4 // ================================================
5
6 // definitions for command selection between progs
7 #define VC_ASGNMNT_BOTH 1
8 #define VC_ASGNMNT_CLIENTONLY 2
9 #define VC_ASGNMNT_SERVERONLY 3
10
11 // vote selection definitions
12 #define VOTE_SELECT_ABSTAIN -2
13 #define VOTE_SELECT_REJECT -1
14 #define VOTE_SELECT_NULL 0
15 #define VOTE_SELECT_ACCEPT 1
16
17 // different statuses of the current vote
18 #define VOTE_NULL 0
19 #define VOTE_NORMAL 1
20 #define VOTE_MASTER 2
21
22 // global vote information declarations
23 entity vote_caller; // original caller of the current vote
24 float vote_called; // stores status of current vote (See VOTE_*)
25 float vote_endtime; // time when the vote is finished
26 float vote_accept_count; // total amount of players who accept the vote (counted by VoteCount() function)
27 float vote_reject_count; // same as above, but rejected
28 float vote_abstain_count; // same as above, but abstained
29 float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor)
30 .float vote_master; // flag for if the player has vote master privelages 
31 .float vote_waittime; // flag for how long the player must wait before they can vote again
32 .float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*)
33 string vote_called_command; // command sent by client
34 string vote_called_display; // visual string of command sent by client
35 string vote_parsed_command; // command which is fixed after being parsed
36 string vote_parsed_display; // visual string which is fixed after being parsed
37
38 // allow functions to be used in other code like g_world.qc and teamplay.qc
39 void VoteThink();
40 void VoteReset();
41
42 // warmup and nagger stuff
43 #define RESTART_COUNTDOWN 10
44 entity nagger;
45 float readycount; // amount of players who are ready
46 float readyrestart_happened; // keeps track of whether a restart has already happened
47 float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed
48 .float ready; // flag for if a player is ready
49 void ReadyCount();