]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
71902647893ea6d3b14ec0dbc9b36cf615a6e299
[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 const int MAX_SBT_FIELDS = MAX_SCORE;
44
45 PlayerScoreField sbt_field[MAX_SBT_FIELDS + 1];
46 float sbt_field_size[MAX_SBT_FIELDS + 1];
47 string sbt_field_title[MAX_SBT_FIELDS + 1];
48 int sbt_num_fields;
49
50 vector hud_fontsize;
51
52 float RANKINGS_RECEIVED_CNT;
53 string grecordholder[RANKINGS_CNT];
54 float grecordtime[RANKINGS_CNT];
55 //float csqc_flags;
56
57 entity playerslots[255]; // 255 is engine limit on maxclients
58 entity teamslots[17];    // 17 teams (including "spectator team")
59 .float gotscores;
60 .entity owner;
61 .float ready;
62 .float eliminated;
63
64 .void(entity) draw;
65 IntrusiveList g_drawables;
66 STATIC_INIT(g_drawables) { g_drawables = IL_NEW(); }
67 .void(entity) draw2d;
68 IntrusiveList g_drawables_2d;
69 STATIC_INIT(g_drawables_2d) { g_drawables_2d = IL_NEW(); }
70 .void(entity) entremove;
71 float drawframetime;
72 vector view_origin, view_forward, view_right, view_up;
73
74 IntrusiveList g_radarlinks;
75 STATIC_INIT(g_radarlinks) { g_radarlinks = IL_NEW(); }
76 IntrusiveList g_radaricons;
77 STATIC_INIT(g_radaricons) { g_radaricons = IL_NEW(); }
78
79 IntrusiveList g_onsgenerators;
80 STATIC_INIT(g_onsgenerators) { g_onsgenerators = IL_NEW(); }
81
82 bool button_zoom;
83 bool spectatorbutton_zoom;
84 bool button_attack2;
85
86 Weapon activeweapon;
87 Weapon switchingweapon;
88 Weapon switchweapon;
89 float current_viewzoom;
90 float zoomin_effect;
91 float warmup_stage;
92
93 void Fog_Force();
94
95 string _getcommandkey(string text, string command, bool forcename);
96 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
97 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
98
99 string vote_called_vote;
100 float ready_waiting;
101 float ready_waiting_for_me;
102 float vote_waiting;
103 float vote_waiting_for_me;
104
105 float current_zoomfraction;
106
107 float cs_project_is_b0rked;
108 float vid_width, vid_height, vid_pixelheight;
109
110 float camera_active;            // Demo camera is active if set to true
111 float chase_active_backup;
112 float camera_roll;
113 vector camera_direction;
114
115 void centerprint_hud(string strMessage);
116 void centerprint_kill(float id);
117 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
118
119 const float ALPHA_MIN_VISIBLE = 0.003;
120
121 float armorblockpercent;
122
123 //hooks
124 int calledhooks;
125 const int HOOK_START =    1;
126 const int HOOK_END =      2;
127
128 .float ping, ping_packetloss, ping_movementloss;
129
130 float g_trueaim_minrange;
131
132 int hud;
133 float view_quality;
134
135 int num_spectators;
136 const int MAX_SPECTATORS = 7;
137 int spectatorlist[MAX_SPECTATORS];
138
139 int framecount;
140 .float health;
141
142 float GetSpeedUnitFactor(int speed_unit);
143 string GetSpeedUnit(int speed_unit);