Xonotic
race.qh
Go to the documentation of this file.
1 #pragma once
2 
4 
5 float race_teams;
6 
7 // scores
8 const float ST_RACE_LAPS = 1;
9 
11 
13 
16 
18 float race_highest_place_spawn; // number of places; a place higher gets spawned at 0
19 float race_lowest_place_spawn; // where to spawn in qualifying
23 .float race_place;
24 .float race_started;
26 .float race_laptime;
28 
29 .float race_movetime; // for reading
30 .float race_movetime_frac; // fractional accumulator for higher accuracy (helper for writing)
31 .float race_movetime_count; // integer accumulator
32 
34 .entity race_respawn_spotref; // try THIS spawn in case you respawn
35 
36 // definitions for functions used outside race.qc
37 void write_recordmarker(entity pl, float tstart, float dt);
38 
39 float race_PreviousCheckpoint(float f);
40 float race_NextCheckpoint(float f);
42 void race_ImposePenaltyTime(entity pl, float penalty, string reason);
45 float race_readTime(string map, float pos);
46 string race_readUID(string map, float pos);
47 string race_readName(string map, float pos);
48 
49 void race_checkAndWriteName(entity player);
50 void race_ClearRecords();
51 void race_SendNextCheckpoint(entity e, float spec);
52 void race_PreparePlayer(entity this);
53 void race_send_recordtime(float msg);
54 
55 void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage);
56 
60 
64 
65 void race_send_speedaward(float msg);
66 void race_send_speedaward_alltimebest(float msg);
67 void race_SpeedAwardFrame(entity player);
68 
69 void race_send_rankings_cnt(float msg);
70 void race_SendRanking(float pos, float prevpos, float del, float msg);
71 void race_SendAll(entity player, bool only_rankings);
72 
73 void race_RetractPlayer(entity this);
74 
75 void race_InitSpectator();
76 
77 string uid2name(string myuid);
78 
79 spawnfunc(target_checkpoint);
string speedaward_uid
Definition: race.qh:59
float race_place
Definition: race.qh:23
float race_NextCheckpoint(float f)
Definition: race.qc:182
int autocvar_g_cts_send_rankings_cnt
Definition: race.qh:10
void race_ImposePenaltyTime(entity pl, float penalty, string reason)
Definition: race.qc:1225
void race_send_rankings_cnt(float msg)
Definition: race.qc:277
void race_InitSpectator()
Definition: race.qc:71
void race_AbandonRaceCheck(entity p)
Definition: race.qc:1163
entity() spawn
float race_spawns
Definition: race.qh:17
float speedaward_lastupdate
Definition: race.qh:15
string speedaward_alltimebest_uid
Definition: race.qh:63
string speedaward_alltimebest_holder
Definition: race.qh:62
void race_StartCompleting()
Definition: race.qc:1174
float race_GetFractionalLapCount(entity e)
Definition: race.qc:1289
float race_completing
Definition: race.qh:27
void race_ClearRecords()
Definition: race.qc:1210
float race_readTime(string map, float pos)
Definition: race.qc:78
bool g_race_qualifying
Definition: race.qh:12
entity race_respawn_spotref
Definition: race.qh:34
void race_SendAll(entity player, bool only_rankings)
Definition: race.qc:324
void race_SendNextCheckpoint(entity e, float spec)
Definition: race.qc:216
spawnfunc(target_checkpoint)
Definition: race.qc:1153
void race_checkAndWriteName(entity player)
Definition: race.qc:143
float race_movetime_count
Definition: race.qh:31
void race_SendRanking(float pos, float prevpos, float del, float msg)
Definition: race.qc:285
float speedaward_alltimebest
Definition: race.qh:61
void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage)
Definition: race.qc:365
bool autocvar_g_allow_checkpoints
Definition: race.qh:3
string uid2name(string myuid)
Definition: race.qc:36
float race_movetime
Definition: race.qh:29
const float ST_RACE_LAPS
Definition: race.qh:8
void race_RetractPlayer(entity this)
Definition: race.qc:1189
void write_recordmarker(entity pl, float tstart, float dt)
Definition: race.qc:57
float race_movetime_frac
Definition: race.qh:30
float race_fraglimit
Definition: race.qh:20
float race_completed
Definition: race.qh:25
float race_started
Definition: race.qh:24
float speedaward_speed
Definition: race.qh:57
void race_send_speedaward_alltimebest(float msg)
Definition: race.qc:268
float race_respawn_checkpoint
Definition: race.qh:33
void race_PreparePlayer(entity this)
Definition: race.qc:1180
float race_PreviousCheckpoint(float f)
Definition: race.qc:190
float race_highest_place_spawn
Definition: race.qh:18
string race_readUID(string map, float pos)
Definition: race.qc:83
float speedaward_lastsent
Definition: race.qh:14
float race_laptime
Definition: race.qh:26
float race_leadlimit
Definition: race.qh:21
string speedaward_holder
Definition: race.qh:58
void race_send_recordtime(float msg)
Definition: race.qc:251
string race_readName(string map, float pos)
Definition: race.qc:138
float race_lowest_place_spawn
Definition: race.qh:19
void race_SpeedAwardFrame(entity player)
Definition: race.qc:296
float race_timelimit
Definition: race.qh:22
float race_teams
Definition: race.qh:5
void race_send_speedaward(float msg)
Definition: race.qc:259