]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/round_handler.qh
#include this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / round_handler.qh
1 #ifndef ROUND_HANDLER_H
2 #define ROUND_HANDLER_H
3
4 #if defined(CSQC)
5 #elif defined(MENUQC)
6 #elif defined(SVQC)
7     #include "../common/util-pre.qh"
8     #include "sys-pre.qh"
9     #include "../dpdefs/progsdefs.qc"
10     #include "../dpdefs/dpextensions.qc"
11     #include "sys-post.qh"
12     #include "../warpzonelib/anglestransform.qh"
13     #include "../warpzonelib/mathlib.qh"
14     #include "../warpzonelib/common.qh"
15     #include "../warpzonelib/util_server.qh"
16     #include "../warpzonelib/server.qh"
17     #include "../common/constants.qh"
18     #include "../common/stats.qh"
19     #include "../common/teams.qh"
20     #include "../common/util.qh"
21     #include "../common/nades.qh"
22     #include "../common/buffs.qh"
23     #include "../common/test.qh"
24     #include "../common/counting.qh"
25     #include "../common/urllib.qh"
26     #include "../common/command/markup.qh"
27     #include "../common/command/rpn.qh"
28     #include "../common/command/generic.qh"
29     #include "../common/command/shared_defs.qh"
30     #include "../common/net_notice.qh"
31     #include "../common/animdecide.qh"
32     #include "../common/monsters/monsters.qh"
33     #include "../common/monsters/sv_monsters.qh"
34     #include "../common/monsters/spawn.qh"
35     #include "../common/weapons/config.qh"
36     #include "../common/weapons/weapons.qh"
37     #include "weapons/accuracy.qh"
38     #include "weapons/common.qh"
39     #include "weapons/csqcprojectile.qh"
40     #include "weapons/hitplot.qh"
41     #include "weapons/selection.qh"
42     #include "weapons/spawning.qh"
43     #include "weapons/throwing.qh"
44     #include "weapons/tracing.qh"
45     #include "weapons/weaponstats.qh"
46     #include "weapons/weaponsystem.qh"
47     #include "t_items.qh"
48     #include "autocvars.qh"
49     #include "constants.qh"
50     #include "defs.qh"
51     #include "../common/notifications.qh"
52     #include "../common/deathtypes.qh"
53     #include "mutators/mutators_include.qh"
54     #include "tturrets/include/turrets_early.qh"
55     #include "vehicles/vehicles_def.qh"
56     #include "campaign.qh"
57     #include "../common/campaign_common.qh"
58     #include "../common/mapinfo.qh"
59     #include "command/common.qh"
60     #include "command/banning.qh"
61     #include "command/radarmap.qh"
62     #include "command/vote.qh"
63     #include "command/getreplies.qh"
64     #include "command/cmd.qh"
65     #include "command/sv_cmd.qh"
66     #include "../common/csqcmodel_settings.qh"
67     #include "../csqcmodellib/common.qh"
68     #include "../csqcmodellib/sv_model.qh"
69     #include "anticheat.qh"
70     #include "cheats.qh"
71     #include "../common/playerstats.qh"
72     #include "portals.qh"
73     #include "g_hook.qh"
74     #include "scores.qh"
75     #include "spawnpoints.qh"
76     #include "mapvoting.qh"
77     #include "ipban.qh"
78     #include "race.qh"
79     #include "antilag.qh"
80     #include "playerdemo.qh"
81 #endif
82
83 entity round_handler;
84 .float delay; // stores delay from round end to countdown start
85 .float count; // stores initial number of the countdown
86 .float wait; // it's set to true when round ends, to false when countdown starts
87 .float cnt;     // its initial value is .count + 1, then decreased while counting down
88                         // reaches 0 when the round starts
89 .float round_timelimit;
90 .float round_endtime;
91 .float() canRoundStart;
92 .float() canRoundEnd;
93 .void() roundStart;
94
95 void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
96 void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
97 void round_handler_Reset(float next_think);
98 void round_handler_Remove();
99
100 #define round_handler_IsActive() (round_handler != world)
101 #define round_handler_AwaitingNextRound() (round_handler.wait)
102 #define round_handler_CountdownRunning() (!round_handler.wait && round_handler.cnt)
103 #define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt)
104 #define round_handler_GetEndTime() (round_handler.round_endtime)
105
106 #endif