]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/race.qh
Merge branch 'master' into terencehill/less_entities
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qh
1 #pragma once
2
3 bool autocvar_g_allow_checkpoints;
4
5 .string stored_netname; // TODO: store this information independently of race-based gamemodes
6
7 float race_teams;
8
9 // scores
10 const float ST_RACE_LAPS = 1;
11
12 int autocvar_g_cts_send_rankings_cnt = 15;
13
14 bool g_race_qualifying;
15
16 float speedaward_lastsent;
17 float speedaward_lastupdate;
18
19 float race_spawns;
20 float race_highest_place_spawn; // number of places; a place higher gets spawned at 0
21 float race_lowest_place_spawn; // where to spawn in qualifying
22 float race_fraglimit;
23 float race_leadlimit;
24 float race_timelimit;
25 .float race_place;
26 .float race_started;
27 .float race_completed;
28 .float race_laptime;
29 float race_completing;
30
31 .float race_movetime; // for reading
32 .float race_movetime_frac; // fractional accumulator for higher accuracy (helper for writing)
33 .float race_movetime_count; // integer accumulator
34
35 .float race_respawn_checkpoint;
36 .entity race_respawn_spotref; // try THIS spawn in case you respawn
37
38 // definitions for functions used outside race.qc
39 void write_recordmarker(entity pl, float tstart, float dt);
40
41 float race_PreviousCheckpoint(float f);
42 float race_NextCheckpoint(float f);
43 void race_AbandonRaceCheck(entity p);
44 void race_ImposePenaltyTime(entity pl, float penalty, string reason);
45 void race_StartCompleting();
46 float race_GetFractionalLapCount(entity e);
47 float race_readTime(string map, float pos);
48 string race_readUID(string map, float pos);
49 string race_readName(string map, float pos);
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 void race_send_speedaward(float msg);
55 void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage);
56
57 float speedaward_speed;
58 string speedaward_holder;
59 string speedaward_uid;
60
61 float speedaward_alltimebest;
62 string speedaward_alltimebest_holder;
63 string speedaward_alltimebest_uid;
64
65 void race_send_speedaward(float msg);
66
67 void race_send_speedaward_alltimebest(float msg);
68
69 void race_send_rankings_cnt(float msg);
70
71 void race_SendRankings(float pos, float prevpos, float del, float msg);
72
73 void race_RetractPlayer(entity this);
74
75 void race_InitSpectator();
76
77 string uid2name(string myuid);
78
79 spawnfunc(target_checkpoint);