]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/command/common.qh
a11ea856a9a79cdc4903b7c30416bc3f72379b51
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qh
1 #ifndef COMMAND_COMMON_H
2 #define COMMAND_COMMON_H
3
4 // ============================================================
5 //  Shared declarations for server commands, written by Samual
6 //  Last updated: December 30th, 2011
7 // ============================================================
8
9 // client verification results
10 const float CLIENT_ACCEPTABLE = 1;
11 const float CLIENT_DOESNT_EXIST = -1;
12 const float CLIENT_NOT_REAL = -2;
13 const float CLIENT_NOT_BOT = -3;
14
15 // definitions for timeouts
16 const float TIMEOUT_INACTIVE = 0;
17 const float TIMEOUT_LEADTIME = 1;
18 const float TIMEOUT_ACTIVE = 2;
19
20 // timeout which pauses the game by setting the slowmo value extremely low.
21 const float TIMEOUT_SLOWMO_VALUE = 0.0001;
22
23 // global timeout information declarations
24 entity timeout_caller; // contains the entity of the player who started the last timeout
25 entity timeout_handler; // responsible for centerprinting the timeout countdowns and playing sounds
26 float sys_frametime; // gets initialised in worldspawn, saves the value from autocvar_sys_ticrate
27 float orig_slowmo; // contains the value of autocvar_slowmo so that, after timeout finished, it isn't set to slowmo 1 necessarily
28 float timeout_time; // contains the time in seconds that the active timeout has left
29 float timeout_leadtime; // contains the number of seconds left of the leadtime (before the timeout starts)
30 float timeout_status; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2)
31 .float allowed_timeouts; // contains the number of allowed timeouts for each player
32 .vector lastV_angle; //used when pausing the game in order to force the player to keep his old view angle fixed
33
34 // allow functions to be used in other code like g_world.qc and teamplay.qc
35 void timeout_handler_think();
36
37 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
38 void CommonCommand_macro_write_aliases(float fh);
39
40 // keep track of the next token to use for argc
41 float next_token;
42 #endif