X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qh;h=cd34fa2f638f8284e96854cfc5b76dd65eba4568;hb=ba0988ca930f50286f8cf3b6c114ebc6584964af;hp=1225b6be582cecb5feb9ecb6a645d1fd161d0ab6;hpb=94579b4c440f739c1203ea5e546d3fcadb884c51;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 1225b6be5..cd34fa2f6 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -1,23 +1,49 @@ +#ifndef VOTE_H +#define VOTE_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../sys-post.qh" + #include "../../common/constants.qh" + #include "../../common/util.qh" + #include "../../common/command/shared_defs.qh" + #include "../autocvars.qh" + #include "../constants.qh" + #include "../defs.qh" + #include "../../common/notifications.qh" + #include "../mutators/mutators_include.qh" + #include "../../common/mapinfo.qh" + #include "common.qh" + #include "vote.qh" + #include "../../common/playerstats.qh" + #include "../scores.qh" + #include "../race.qh" + #include "../round_handler.qh" +#endif + // ================================================ // 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 @@ -27,7 +53,7 @@ float vote_accept_count; // total amount of players who accept the vote (counted 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_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 @@ -41,11 +67,12 @@ void VoteReset(); void VoteCommand(float request, entity caller, float 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 restart_mapalreadyrestarted; // bool, indicates whether reset_map() was already executed .float ready; // flag for if a player is ready void reset_map(float dorespawn); -void ReadyCount(); \ No newline at end of file +void ReadyCount(); +#endif \ No newline at end of file