3 // ================================================
4 // Declarations for the vote system/vote commands
5 // Last updated: December 14th, 2011
6 // ================================================
8 // definitions for command selection between progs
9 const float VC_ASGNMNT_BOTH = 1;
10 const float VC_ASGNMNT_CLIENTONLY = 2;
11 const float VC_ASGNMNT_SERVERONLY = 3;
13 // vote selection definitions
14 const float VOTE_SELECT_ABSTAIN = -2;
15 const float VOTE_SELECT_REJECT = -1;
16 const float VOTE_SELECT_NULL = 0;
17 const float VOTE_SELECT_ACCEPT = 1;
19 // different statuses of the current vote
20 const float VOTE_NULL = 0;
21 const float VOTE_NORMAL = 1;
22 const float VOTE_MASTER = 2;
24 // global vote information declarations
25 entity vote_caller; // original caller of the current vote
26 string vote_caller_name; // name of the vote caller
27 float vote_called; // stores status of current vote (See VOTE_*)
28 float vote_endtime; // time when the vote is finished
29 float vote_accept_count; // total amount of players who accept the vote (counted by VoteCount() function)
30 float vote_reject_count; // same as above, but rejected
31 float vote_abstain_count; // same as above, but abstained
32 float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor)
33 .float vote_master; // flag for if the player has vote master privelages
34 .float vote_waittime; // flag for how long the player must wait before they can vote again
35 .float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*)
36 string vote_called_command; // command sent by client
37 string vote_called_display; // visual string of command sent by client
38 string vote_parsed_command; // command which is fixed after being parsed
39 string vote_parsed_display; // visual string which is fixed after being parsed
41 // allow functions to be used in other code like g_world.qc and teamplay.qc
44 void VoteCommand(int request, entity caller, int argc, string vote_command);
46 // warmup and nagger stuff
47 const float RESTART_COUNTDOWN = 10;
49 float readycount; // amount of players who are ready
50 float readyrestart_happened; // keeps track of whether a restart has already happened
51 float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed
52 .float ready; // flag for if a player is ready
53 void reset_map(float dorespawn);
55 void ReadyRestart_force();
56 void VoteCount(float first_count);