]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/race.qh
Fix aim glitches when bot_ai_aimskill_mouse is set to a value between 0 and 1
[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
8 int autocvar_g_cts_send_rankings_cnt = 15;
9
10 bool g_race_qualifying;
11
12 float speedaward_lastsent;
13 float speedaward_lastupdate;
14
15 float race_spawns;
16 float race_highest_place_spawn; // number of places; a place higher gets spawned at 0
17 float race_lowest_place_spawn; // where to spawn in qualifying
18 float race_fraglimit;
19 float race_leadlimit;
20 float race_timelimit;
21 .float race_place;
22 .float race_started;
23 .float race_completed;
24 .float race_laptime;
25 float race_completing;
26
27 .float race_movetime; // for reading
28 .float race_movetime_frac; // fractional accumulator for higher accuracy (helper for writing)
29 .float race_movetime_count; // integer accumulator
30
31 .float race_respawn_checkpoint;
32 .entity race_respawn_spotref; // try THIS spawn in case you respawn
33
34 IntrusiveList g_racecheckpoints;
35 STATIC_INIT(g_racecheckpoints) { g_racecheckpoints = IL_NEW(); }
36
37 // definitions for functions used outside race.qc
38 float race_PreviousCheckpoint(float f);
39 float race_NextCheckpoint(float f);
40 void race_AbandonRaceCheck(entity p);
41 void race_ImposePenaltyTime(entity pl, float penalty, string reason);
42 void race_StartCompleting();
43 float race_GetFractionalLapCount(entity e);
44 float race_readTime(string map, float pos);
45 string race_readUID(string map, float pos);
46 string race_readName(string map, float pos);
47 void race_ClearRecords();
48 void race_SendNextCheckpoint(entity e, float spec);
49 void race_PreparePlayer(entity this);
50 void race_send_recordtime(float msg);
51 void race_send_speedaward(float msg);
52 void race_setTime(string map, float t, string myuid, string mynetname, entity e, bool showmessage);
53
54 float speedaward_speed;
55 string speedaward_holder;
56 string speedaward_uid;
57
58 float speedaward_alltimebest;
59 string speedaward_alltimebest_holder;
60 string speedaward_alltimebest_uid;
61
62 void race_send_speedaward(float msg);
63
64 void race_send_speedaward_alltimebest(float msg);
65
66 void race_send_rankings_cnt(float msg);
67
68 void race_SendRankings(float pos, float prevpos, float del, float msg);
69
70 void race_RetractPlayer(entity this);
71
72 void race_InitSpectator();
73
74 spawnfunc(target_checkpoint);