X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qh;h=988e91bbce615648873186adf6fb5306d4641c54;hb=1a18ff8e9f729e903015f5baa6605c92c92ea13d;hp=0386e1d5a187f033da2ffc6ab7a6f99ebf98a6e7;hpb=0f3709f96ff607455d69dc4844e39a8ea0587675;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 0386e1d5a..988e91bbc 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -1,35 +1,38 @@ +#pragma once + // ================================================ // Declarations for the vote system/vote commands // Last updated: December 14th, 2011 // ================================================ // definitions for command selection between progs -#define VC_ASGNMNT_BOTH 1 -#define VC_ASGNMNT_CLIENTONLY 2 -#define VC_ASGNMNT_SERVERONLY 3 +const float VC_ASGNMNT_BOTH = 1; +const float VC_ASGNMNT_CLIENTONLY = 2; +const float VC_ASGNMNT_SERVERONLY = 3; // vote selection definitions -#define VOTE_SELECT_ABSTAIN -2 -#define VOTE_SELECT_REJECT -1 -#define VOTE_SELECT_NULL 0 -#define VOTE_SELECT_ACCEPT 1 +const float VOTE_SELECT_ABSTAIN = -2; +const float VOTE_SELECT_REJECT = -1; +const float VOTE_SELECT_NULL = 0; +const float VOTE_SELECT_ACCEPT = 1; // different statuses of the current vote -#define VOTE_NULL 0 -#define VOTE_NORMAL 1 -#define VOTE_MASTER 2 +const float VOTE_NULL = 0; +const float VOTE_NORMAL = 1; +const float VOTE_MASTER = 2; // global vote information declarations -entity vote_caller; // original caller of the current vote -float vote_called; // stores status of current vote (See VOTE_*) -float vote_endtime; // time when the vote is finished -float vote_accept_count; // total amount of players who accept the vote (counted by VoteCount() function) -float vote_reject_count; // same as above, but rejected -float vote_abstain_count; // same as above, but abstained -float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor) -.float vote_master; // flag for if the player has vote master privelages -.float vote_waittime; // flag for how long the player must wait before they can vote again -.float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*) +entity vote_caller; // original caller of the current vote +string vote_caller_name; // name of the vote caller +float vote_called; // stores status of current vote (See VOTE_*) +float vote_endtime; // time when the vote is finished +float vote_accept_count; // total amount of players who accept the vote (counted by VoteCount() function) +float vote_reject_count; // same as above, but rejected +float vote_abstain_count; // same as above, but abstained +float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor) +.float vote_master; // flag for if the player has vote master privelages +.float vote_waittime; // flag for how long the player must wait before they can vote again +.float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*) string vote_called_command; // command sent by client string vote_called_display; // visual string of command sent by client string vote_parsed_command; // command which is fixed after being parsed @@ -38,14 +41,17 @@ string vote_parsed_display; // visual string which is fixed after being parsed // allow functions to be used in other code like g_world.qc and teamplay.qc void VoteThink(); void VoteReset(); -void VoteCommand(float request, entity caller, float argc, string vote_command); +void VoteCommand(int request, entity caller, int argc, string vote_command); // warmup and nagger stuff -#define RESTART_COUNTDOWN 10 +const float RESTART_COUNTDOWN = 10; entity nagger; -float readycount; // amount of players who are ready -float readyrestart_happened; // keeps track of whether a restart has already happened +float readycount; // amount of players who are ready +float readyrestart_happened; // keeps track of whether a restart has already happened float restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed -.float ready; // flag for if a player is ready +.float ready; // flag for if a player is ready void reset_map(float dorespawn); -void ReadyCount(); \ No newline at end of file +void ReadyCount(); +void ReadyRestart_force(); +void VoteCount(float first_count); +void Nagger_Init();