]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
Merge branch 'master' into fruitiex/newpanelhud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 const string string_null;
2
3 // --------------------------------------------------------------------------
4 // MENU Functionality
5
6 #define DATABUF_PING 0
7 #define DATABUF_CAPTURES (1*maxclients)
8 #define DATABUF_DEATHS (2*maxclients)
9 #define DATABUF_RETURNS (3*maxclients)
10
11 #define DATABUF_NEXT (5*maxclients)
12
13 void() menu_show_error;
14 void() menu_sub_null;
15
16 float menu_visible;
17 var void() menu_show;
18 var float(float bInputType, float nPrimary, float nSecondary) menu_action;
19
20 // --------------------------------------------------------------------------
21 // CTF
22
23 void() ctf_menu_show;
24 string ctf_temp_1;
25
26 // --------------------------------------------------------------------------
27 // Onslaught
28
29 // Map coordinate base calculations need these
30 vector mi_center;
31 vector mi_scale;
32 // Minimap
33 string minimapname;
34
35 // --------------------------------------------------------------------------
36 // General stuff
37
38 float drawfont;
39 float postinit;
40 float gametype;
41
42 //float sorted_players;
43 //float sorted_teams;
44
45 // Defs
46 //.float ctf_state;
47 //.float health;
48
49 // Constants
50 const float COLOR_TEAM_RED = 64;
51 const float COLOR_TEAM_BLUE = 208;
52
53 const float COLOR_TEAM1       = 4;  // red
54 const float COLOR_TEAM2       = 13; // blue
55 const float COLOR_TEAM3       = 12; // yellow
56 const float COLOR_TEAM4       = 9; // pink
57 const float COLOR_SPECTATOR = 1337;
58
59 #define FONT_DEFAULT 0
60 #define FONT_USER 8
61
62 // --------------------------------------------------------------------------
63 // Scoreboard stuff
64
65 #define MAX_HUD_FIELDS 16
66
67 #define SP_END -1
68
69 #define SP_PING -2
70 #define SP_NAME -3
71 #define SP_KDRATIO -4
72 #define SP_CLRATIO -5
73 #define SP_PL -6
74 #define SP_FRAGS -7
75
76 #define SP_SEPARATOR -100
77
78 float hud_field[MAX_HUD_FIELDS + 1];
79 float hud_size[MAX_HUD_FIELDS + 1];
80 string hud_title[MAX_HUD_FIELDS + 1];
81 float hud_num_fields;
82
83 float hud_font;
84 float hud_bigfont;
85
86 string scores_label[MAX_SCORE];
87 float scores_flags[MAX_SCORE];
88 string teamscores_label[MAX_SCORE];
89 float teamscores_flags[MAX_SCORE];
90 .float scores[MAX_SCORE]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(scores);
91 .float teamscores[MAX_TEAMSCORE]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(teamscores);
92
93 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
94 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
95
96
97 vector hud_fontsize;
98 vector hud_fontsize_spec;
99
100 float RANKINGS_RECEIVED_CNT;
101 string grecordholder[RANKINGS_CNT];
102 float grecordtime[RANKINGS_CNT];
103 //float csqc_flags;
104
105 entity playerslots[255]; // 255 is engine limit on maxclients
106 entity teamslots[17];    // 17 teams (including "spectator team")
107 .float gotscores;
108 .entity owner;
109 .float ready;
110
111 .void(void) draw;
112 .void(void) draw2d;
113 .void(void) entremove;
114 float drawframetime;
115 vector view_origin, view_angles, view_forward, view_right, view_up;
116
117 float button_zoom;
118 float spectatorbutton_zoom;
119 float button_attack2;
120 float activeweapon;
121 float current_viewzoom;
122 float zoomin_effect;
123 float ignore_plus_zoom;
124 float ignore_minus_zoom;
125 float warmup_stage;
126
127 string getcommandkey(string text, string command);
128 float hud_showbinds;
129 float hud_showbinds_limit;
130
131 string vote_called_vote;
132 float ready_waiting;
133 float ready_waiting_for_me;
134 float vote_waiting;
135 float vote_waiting_for_me;
136
137 float previous_game_starttime;
138 entity restartAnnouncer; //a temporary entity which will play the countdown sounds 3, 2, 1 for the client
139 void restartAnnouncer_Think();
140
141 float current_zoomfraction;
142
143 float cs_project_is_b0rked;
144 float vid_width, vid_height, vid_pixelheight;
145
146 float camera_active;            // Demo camera is active if set to TRUE
147 float chase_active_backup;
148 float camera_roll;
149 vector camera_direction;
150
151 void centerprint(string strMessage);
152
153 #define ALPHA_MIN_VISIBLE 0.003
154
155 float armorblockpercent;
156 float g_weaponswitchdelay;
157
158 //hooks
159 float calledhooks;
160 #define HOOK_START    1
161 #define HOOK_END      2
162
163 .float ping, ping_packetloss, ping_movementloss;
164
165 float g_balance_grenadelauncher_secondary_bouncefactor;
166 float g_balance_grenadelauncher_secondary_bouncestop;