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