Xonotic
round_handler.qh
Go to the documentation of this file.
1 #pragma once
2 
4 .float delay; // stores delay from round end to countdown start
5 .float count; // stores initial number of the countdown
6 .bool wait; // it's set to true when round ends, to false when countdown starts
7 .float cnt; // its initial value is .count + 1, then decreased while counting down
8  // reaches 0 when the round starts
11 .bool() canRoundStart;
12 .bool() canRoundEnd;
13 .void() roundStart;
14 
15 void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
16 void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func);
17 void round_handler_Reset(float next_think);
19 
20 #define round_handler_IsActive() (round_handler != NULL)
21 #define round_handler_AwaitingNextRound() (round_handler.wait)
22 #define round_handler_CountdownRunning() (!round_handler.wait && round_handler.cnt)
23 #define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt)
24 #define round_handler_GetEndTime() (round_handler.round_endtime)
float round_endtime
void round_handler_Reset(float next_think)
entity round_handler
Definition: round_handler.qh:3
entity() spawn
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
float cnt
Definition: round_handler.qh:7
void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
float round_timelimit
Definition: round_handler.qh:9
void round_handler_Remove()
bool wait
Definition: round_handler.qh:6
float delay
Definition: round_handler.qh:4
float count
Definition: round_handler.qh:5