]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/round_handler.qh
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / round_handler.qh
index 55026fa84401565d9aca334ee75021c6d07b87d9..e6b17b0e775d76f1868c05d592c633844b1b8b8b 100644 (file)
@@ -1,17 +1,24 @@
+#pragma once
+
 entity round_handler;
 .float delay; // stores delay from round end to countdown start
 .float count; // stores initial number of the countdown
-.float wait; // it's set to TRUE when round ends, to FALSE when countdown starts
+.float wait; // it's set to true when round ends, to false when countdown starts
 .float cnt;    // its initial value is .count + 1, then decreased while counting down
                        // reaches 0 when the round starts
+.float round_timelimit;
+.float round_endtime;
 .float() canRoundStart;
 .float() canRoundEnd;
+.void() roundStart;
 
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, float the_delay, float the_count);
-float round_handler_IsActive();
-float round_handler_AwaitingNextRound();
-float round_handler_CountdownRunning();
-float round_handler_IsRoundStarted();
+void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
+void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
 void round_handler_Reset(float next_think);
 void round_handler_Remove();
 
+#define round_handler_IsActive() (round_handler != NULL)
+#define round_handler_AwaitingNextRound() (round_handler.wait)
+#define round_handler_CountdownRunning() (!round_handler.wait && round_handler.cnt)
+#define round_handler_IsRoundStarted() (!round_handler.wait && !round_handler.cnt)
+#define round_handler_GetEndTime() (round_handler.round_endtime)