X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fround_handler.qh;h=448788442842ab2bd631abb1daefbcf3a0a7678a;hb=4e85c153239969d8dccea38031e18ddb24b6c935;hp=1d3ea773364fa5ffc4c8cefa02065ba79029b114;hpb=26b62c8e0e1129ead59cd7945450d47c7b1b3d0f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/round_handler.qh b/qcsrc/server/round_handler.qh index 1d3ea7733..448788442 100644 --- a/qcsrc/server/round_handler.qh +++ b/qcsrc/server/round_handler.qh @@ -1,7 +1,10 @@ +#ifndef ROUND_HANDLER_H +#define ROUND_HANDLER_H + 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; @@ -10,12 +13,15 @@ entity round_handler; .float() canRoundEnd; .void() roundStart; -void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func, float the_delay, float the_count, float the_round_timelimit); -float round_handler_IsActive(); -float round_handler_AwaitingNextRound(); -float round_handler_CountdownRunning(); -float round_handler_IsRoundStarted(); -float round_handler_GetTimeLeft(); +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 != world) +#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