X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fround_handler.qh;h=5979eb5c33f810faeb55f2add99f7574533fc121;hp=448788442842ab2bd631abb1daefbcf3a0a7678a;hb=1a18ff8e9f729e903015f5baa6605c92c92ea13d;hpb=f2c50fe4e6218a0a1bb0ca078ee122c5ba6a238d diff --git a/qcsrc/server/round_handler.qh b/qcsrc/server/round_handler.qh index 448788442..5979eb5c3 100644 --- a/qcsrc/server/round_handler.qh +++ b/qcsrc/server/round_handler.qh @@ -1,27 +1,24 @@ -#ifndef ROUND_HANDLER_H -#define ROUND_HANDLER_H +#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 +.bool 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; +.bool() canRoundStart; +.bool() canRoundEnd; .void() roundStart; 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_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func); void round_handler_Reset(float next_think); void round_handler_Remove(); -#define round_handler_IsActive() (round_handler != world) +#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) - -#endif