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