Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
round_handler.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define round_handler_AwaitingNextRound()
#define round_handler_CountdownRunning()
#define round_handler_GetEndDelayTime()
#define round_handler_GetEndTime()
#define round_handler_IsActive()
#define round_handler_IsRoundStarted()
#define round_handler_ResetEndDelayTime()
#define round_handler_SetEndDelayTime(t)

Functions

 bool () canRoundStart
void round_handler_Init (float the_delay, float the_count, float the_round_timelimit)
void round_handler_Remove ()
void round_handler_Reset (float next_think)
void round_handler_Spawn (bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
 void () roundStart

Variables

float cnt
float count
float delay
float round_enddelaytime
float round_endtime
entity round_handler
float round_timelimit
bool wait

Macro Definition Documentation

◆ round_handler_AwaitingNextRound

#define round_handler_AwaitingNextRound ( )
Value:
entity round_handler

Definition at line 22 of file round_handler.qh.

◆ round_handler_CountdownRunning

#define round_handler_CountdownRunning ( )
Value:

Definition at line 23 of file round_handler.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ round_handler_GetEndDelayTime

#define round_handler_GetEndDelayTime ( )
Value:
(round_handler.round_enddelaytime)

Definition at line 26 of file round_handler.qh.

Referenced by CA_CheckWinner(), freezetag_CheckWinner(), and Surv_CheckWinner().

◆ round_handler_GetEndTime

#define round_handler_GetEndTime ( )

◆ round_handler_IsActive

◆ round_handler_IsRoundStarted

◆ round_handler_ResetEndDelayTime

#define round_handler_ResetEndDelayTime ( )

◆ round_handler_SetEndDelayTime

#define round_handler_SetEndDelayTime ( t)
Value:
(round_handler.round_enddelaytime = t)

Definition at line 27 of file round_handler.qh.

Referenced by CA_CheckWinner(), freezetag_CheckWinner(), and Surv_CheckWinner().

Function Documentation

◆ bool()

bool ( )

◆ round_handler_Init()

void round_handler_Init ( float the_delay,
float the_count,
float the_round_timelimit )

Definition at line 79 of file round_handler.qc.

80{
81 entity this = round_handler;
82 this.delay = (the_delay > 0) ? the_delay : 0;
83 this.count = fabs(floor(the_count));
84 this.cnt = this.count + 1;
85 this.round_timelimit = (the_round_timelimit > 0) ? the_round_timelimit : 0;
86 round_limit = the_round_timelimit;
87}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float cnt
Definition powerups.qc:24
float count
Definition powerups.qc:22
float delay
Definition items.qc:17
float round_limit
Definition stats.qh:376
float fabs(float f)
float floor(float f)
float round_timelimit

References cnt, count, delay, entity(), fabs(), floor(), round_handler, round_limit, and round_timelimit.

Referenced by CA_CheckWinner(), dom_DelayedInit(), Domination_CheckWinner(), freezetag_CheckWinner(), freezetag_Initialize(), Invasion_CheckWinner(), invasion_DelayedInit(), ons_DelayedInit(), Onslaught_CheckWinner(), REGISTER_MUTATOR(), round_handler_Spawn(), Surv_CheckWinner(), and surv_Initialize().

◆ round_handler_Remove()

void round_handler_Remove ( )

Definition at line 134 of file round_handler.qc.

135{
136 delete(round_handler);
138}

References NULL, and round_handler.

Referenced by round_handler_Think().

◆ round_handler_Reset()

void round_handler_Reset ( float next_think)

Definition at line 119 of file round_handler.qc.

120{
121 entity this = round_handler;
122 this.wait = false;
124 if (this.count)
125 if (this.cnt < this.count + 1) this.cnt = this.count + 1;
126 this.nextthink = next_think;
127 if (next_think)
128 {
129 if (next_think <= game_starttime) rounds_played = 0;
130 round_starttime = next_think + this.count;
131 }
132}
float wait
Definition items.qc:17
float round_starttime
Definition stats.qh:83
float game_starttime
Definition stats.qh:82
int rounds_played
Definition stats.qh:377
float nextthink
#define round_handler_ResetEndDelayTime()

References cnt, count, entity(), game_starttime, nextthink, round_handler, round_handler_ResetEndDelayTime, round_starttime, rounds_played, and wait.

Referenced by reset_map(), and round_handler_Think().

◆ round_handler_Spawn()

void round_handler_Spawn ( bool() canRoundStart_func,
bool() canRoundEnd_func,
void() roundStart_func )

Definition at line 98 of file round_handler.qc.

99{
100 if (round_handler)
101 {
102 backtrace("Can't spawn round_handler again!");
103 return;
104 }
106
108 this.canRoundStart = canRoundStart_func;
109 this.canRoundEnd = canRoundEnd_func;
110 this.roundStart = roundStart_func;
111 this.wait = false;
113 round_handler_Init(5, 5, 180);
114 this.nextthink = time;
115
116 ScoreInfo_SetLabel_PlayerScore(SP_ROUNDS_PL, "rounds_pl", 0);
117}
float time
#define backtrace(msg)
Definition log.qh:99
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
void round_handler_Init(float the_delay, float the_count, float the_round_timelimit)
void round_handler_FirstThink(entity this)
void ScoreInfo_SetLabel_PlayerScore(PlayerScoreField i, string label, int scoreflags)
Definition scores.qc:167
#define setthink(e, f)

References backtrace, entity(), new_pure, nextthink, round_handler, round_handler_FirstThink(), round_handler_Init(), round_handler_ResetEndDelayTime, ScoreInfo_SetLabel_PlayerScore(), setthink, time, and wait.

Referenced by dom_DelayedInit(), freezetag_Initialize(), invasion_DelayedInit(), ons_DelayedInit(), REGISTER_MUTATOR(), and surv_Initialize().

◆ void()

Variable Documentation

◆ cnt

float cnt

Definition at line 7 of file round_handler.qh.

◆ count

float count

Definition at line 5 of file round_handler.qh.

◆ delay

float delay

Definition at line 4 of file round_handler.qh.

◆ round_enddelaytime

float round_enddelaytime

Definition at line 11 of file round_handler.qh.

◆ round_endtime

float round_endtime

Definition at line 10 of file round_handler.qh.

Referenced by round_handler_Think().

◆ round_handler

entity round_handler

◆ round_timelimit

float round_timelimit

Definition at line 9 of file round_handler.qh.

Referenced by HUD_Timer(), round_handler_Init(), and round_handler_Think().

◆ wait

bool wait

Definition at line 6 of file round_handler.qh.