]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/vote.qh
Purge autocvars.qh from the codebase, cvars are defined in the headers of the feature...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qh
index f80785e2a12f8c4935654a8e1853141fb4c5653a..4dfd9e8575f2abf22c9cdc1e639171ca64988e0e 100644 (file)
@@ -1,10 +1,25 @@
-#ifndef VOTE_H
-#define VOTE_H
+#pragma once
 
-// ================================================
-//  Declarations for the vote system/vote commands
-//  Last updated: December 14th, 2011
-// ================================================
+bool autocvar_sv_vote_call;
+bool autocvar_sv_vote_change;
+string autocvar_sv_vote_commands;
+int autocvar_sv_vote_limit;
+float autocvar_sv_vote_majority_factor;
+float autocvar_sv_vote_majority_factor_of_voted;
+bool autocvar_sv_vote_master;
+bool autocvar_sv_vote_master_callable;
+string autocvar_sv_vote_master_commands;
+string autocvar_sv_vote_master_password;
+int autocvar_sv_vote_master_playerlimit;
+bool autocvar_sv_vote_no_stops_vote;
+int autocvar_sv_vote_nospectators;
+//string autocvar_sv_vote_only_commands;
+bool autocvar_sv_vote_override_mostrecent;
+bool autocvar_sv_vote_singlecount;
+float autocvar_sv_vote_stop;
+float autocvar_sv_vote_timeout;
+float autocvar_sv_vote_wait;
+bool autocvar_sv_vote_gamestart;
 
 // definitions for command selection between progs
 const float VC_ASGNMNT_BOTH = 1;
@@ -23,35 +38,42 @@ const float VOTE_NORMAL = 1;
 const float VOTE_MASTER = 2;
 
 // global vote information declarations
-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_*)
+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
 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
+// allow functions to be used in other code like 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
 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
+.int team_saved;                   // team number to restore upon map reset
+.void(entity this) reset;             // if set, an entity is reset using this
+.void(entity this) reset2;         // if set, an entity is reset using this (after calling ALL the reset functions for other entities)
 void reset_map(float dorespawn);
 void ReadyCount();
 void ReadyRestart_force();
-#endif
+void VoteCount(float first_count);
+void Nagger_Init();
+
+IntrusiveList g_saved_team;
+STATIC_INIT(g_saved_team) { g_saved_team = IL_NEW(); }