]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/round_handler.qh
Merge branch 'Mario/qc_updates' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / round_handler.qh
1 #ifndef ROUND_HANDLER_H
2 #define ROUND_HANDLER_H
3
4 entity round_handler;
5 .float delay; // stores delay from round end to countdown start
6 .float count; // stores initial number of the countdown
7 .float wait; // it's set to true when round ends, to false when countdown starts
8 .float cnt;     // its initial value is .count + 1, then decreased while counting down
9                         // reaches 0 when the round starts
10 .float round_timelimit;
11 .float round_endtime;
12 .float() canRoundStart;
13 .float() canRoundEnd;
14 .void() roundStart;
15
16 void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
17 void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
18 void round_handler_Reset(float next_think);
19 void round_handler_Remove();
20
21 #define round_handler_IsActive() (round_handler != world)
22 #define round_handler_AwaitingNextRound() (round_handler.wait)
23 #define round_handler_CountdownRunning() (!round_handler.wait && round_handler.cnt)
24 #define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt)
25 #define round_handler_GetEndTime() (round_handler.round_endtime)
26
27 #endif