]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/race.qh
Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qh
1 #pragma once
2
3 float race_teams;
4
5 // scores
6 const float ST_RACE_LAPS = 1;
7 const float SP_RACE_LAPS = 4;
8 const float SP_RACE_TIME = 5;
9 const float SP_RACE_FASTEST = 6;
10
11 bool g_race_qualifying;
12
13 float speedaward_lastsent;
14 float speedaward_lastupdate;
15
16 float race_spawns;
17 float race_highest_place_spawn; // number of places; a place higher gets spawned at 0
18 float race_lowest_place_spawn; // where to spawn in qualifying
19 float race_fraglimit;
20 float race_leadlimit;
21 float race_timelimit;
22 .float race_place;
23 .float race_started;
24 .float race_completed;
25 .float race_laptime;
26 float race_completing;
27
28 .float race_movetime; // for reading
29 .float race_movetime_frac; // fractional accumulator for higher accuracy (helper for writing)
30 .float race_movetime_count; // integer accumulator
31
32 .float race_respawn_checkpoint;
33 .entity race_respawn_spotref; // try THIS spawn in case you respawn
34
35 // definitions for functions used outside race.qc
36 float race_PreviousCheckpoint(float f);
37 float race_NextCheckpoint(float f);
38 void race_AbandonRaceCheck(entity p);
39 void race_ImposePenaltyTime(entity pl, float penalty, string reason);
40 void race_StartCompleting();
41 float race_GetFractionalLapCount(entity e);
42 float race_readTime(string map, float pos);
43 string race_readUID(string map, float pos);
44 string race_readName(string map, float pos);
45 void race_ClearRecords();
46 void race_SendNextCheckpoint(entity e, float spec);
47 void race_PreparePlayer();
48 void race_send_recordtime(float msg);
49 void race_send_speedaward(float msg);
50
51 float speedaward_speed;
52 string speedaward_holder;
53 string speedaward_uid;
54
55 float speedaward_alltimebest;
56 string speedaward_alltimebest_holder;
57 string speedaward_alltimebest_uid;
58
59 void race_send_speedaward(float msg);
60
61 void race_send_speedaward_alltimebest(float msg);
62
63 void race_SendRankings(float pos, float prevpos, float del, float msg);
64
65 void race_RetractPlayer();
66
67 void race_InitSpectator();