]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
Merge branch 'master' into martin-t/bullet-trails
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 #pragma once
2
3 #include <common/constants.qh>
4 #include <common/weapons/_all.qh>
5
6 // Map coordinate base calculations need these
7 vector mi_center;
8 vector mi_scale;
9 // Minimap
10 string minimapname;
11
12 bool postinit;
13 entity gametype;
14
15 float FONT_USER = 8;
16
17
18 vector OFFSET_CURSOR = '0 0 0';
19 vector SIZE_CURSOR = '32 32 0';
20 void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
21 void draw_cursor_normal(vector pos, vector col, float a);
22 void LoadMenuSkinValues();
23
24 void PostInit();
25
26 void Ent_Remove(entity this);
27
28 void Gamemode_Init();
29
30 bool SetTeam(entity pl, int Team);
31
32 vector hud_fontsize;
33
34 float RANKINGS_RECEIVED_CNT;
35 float RANKINGS_DISPLAY_CNT;
36 string grecordholder[RANKINGS_CNT];
37 float grecordtime[RANKINGS_CNT];
38
39 entity playerslots[255]; // 255 is engine limit on maxclients
40 entity teamslots[17];    // 17 teams (including "spectator team")
41 .bool gotscores;
42 .entity owner;
43 .bool ready;
44 .bool eliminated;
45
46 .void(entity) draw;
47 IntrusiveList g_drawables;
48 STATIC_INIT(g_drawables) { g_drawables = IL_NEW(); }
49 .void(entity) draw2d;
50 IntrusiveList g_drawables_2d;
51 STATIC_INIT(g_drawables_2d) { g_drawables_2d = IL_NEW(); }
52 .void(entity) entremove;
53 float drawframetime;
54 vector view_origin, view_forward, view_right, view_up;
55
56 IntrusiveList g_radarlinks;
57 STATIC_INIT(g_radarlinks) { g_radarlinks = IL_NEW(); }
58 IntrusiveList g_radaricons;
59 STATIC_INIT(g_radaricons) { g_radaricons = IL_NEW(); }
60
61 bool button_zoom;
62 bool spectatorbutton_zoom;
63 bool button_attack2;
64
65 float current_viewzoom;
66 float zoomin_effect;
67 bool warmup_stage;
68
69 void Fog_Force();
70
71 string _getcommandkey(string text, string command, bool forcename);
72 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
73 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
74
75 string vote_called_vote;
76 bool ready_waiting;
77 bool ready_waiting_for_me;
78 bool vote_waiting;
79 bool vote_waiting_for_me;
80
81 float current_zoomfraction;
82
83 int cs_project_is_b0rked;
84 int vid_width, vid_height;
85 float vid_pixelheight;
86
87 float camera_active;            // Demo camera is active if set to true
88 float chase_active_backup;
89 float camera_roll;
90 vector camera_direction;
91
92 void centerprint_hud(string strMessage);
93 void centerprint_kill(float id);
94 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
95
96 const float ALPHA_MIN_VISIBLE = 0.003;
97
98 float armorblockpercent;
99 float damagepush_speedfactor;
100
101 //hooks
102 int calledhooks;
103 const int HOOK_START =    1;
104 const int HOOK_END =      2;
105
106 .float ping, ping_packetloss, ping_movementloss;
107
108 float g_trueaim_minrange;
109
110 int hud;
111 float view_quality;
112
113 int num_spectators;
114 const int MAX_SPECTATORS = 7;
115 int spectatorlist[MAX_SPECTATORS];
116
117 int framecount;
118
119 float GetSpeedUnitFactor(int speed_unit);
120 string GetSpeedUnit(int speed_unit);