]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/vehicles/vehicles.qc
save state before removing stale code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / vehicles / vehicles.qc
1 #define spider_rocket_icon "gfx/vehicles/rocket_ico.tga"
2 #define spider_rocket_targ "gfx/vehicles/target.tga"
3 //#define SPIDER_CROSS "textures/spiderbot/cross.tga"
4 #define SPIDER_CROSS "gfx/vehicles/sbot-xhair.tga"
5 #define SPIDER_CROSS2 "gfx/vehicles/sbot-xhair2.tga"
6
7 #define axh1 "gfx/vehicles/sbot-xhair2.tga"
8 #define axh2 "gfx/vehicles/sbot-xhair2.tga"
9 #define axh3 "gfx/vehicles/sbot-xhair2.tga"
10
11 #define spider_h "gfx/vehicles/hud_bg.tga"
12 #define spider_b "gfx/vehicles/sbot.tga"
13 #define spider_r "gfx/vehicles/sbot_rpods.tga"
14 #define spider_g "gfx/vehicles/sbot_mguns.tga"
15 #define spider_s "gfx/vehicles/shiled.tga"
16 #define spider_a1 "gfx/vehicles/sb_rocket.tga"
17 #define spider_a2 "gfx/vehicles/sb_bullets.tga"
18
19 #define raptor_h  "gfx/vehicles/hud_bg.tga"
20 #define raptor_s  "gfx/vehicles/shiled.tga"
21
22 #define raptor_b  "gfx/vehicles/raptor.tga"
23 #define raptor_g1 "gfx/vehicles/raptor_guns.tga"
24 #define raptor_g2 "gfx/vehicles/raptor_bombs.tga"
25 #define raptor_d  "gfx/vehicles/dropcross.tga"
26 #define raptor_c  "gfx/vehicles/raptor_cross.tga"
27
28 entity dropmark;
29 vector lastpos;
30
31
32 void CSQC_WAKIZASHI_HUD();
33 void CSQC_SPIDER_HUD();
34 void CSQC_RAPTOR_HUD();
35
36 #define MAX_AXH 4
37 entity AuxiliaryXhair[MAX_AXH];
38 const var void Draw_Not();
39
40 .string axh_image;
41 .float  axh_fadetime;
42 .float  axh_drawflag;
43 .float  axh_scale;
44
45 void AuxiliaryXhair_Draw2D()
46 {
47     vector loc, psize;
48
49     psize = self.axh_scale * drawgetimagesize(self.axh_image);
50     loc = project_3d_to_2d(self.origin) - 0.5 * psize;
51     if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight)
52     {
53         loc_z = 0;
54         psize_z = 0;
55         drawpic(loc, self.axh_image, psize, self.colormod, self.alpha, self.axh_drawflag);
56     }
57
58     if(time - self.cnt > self.axh_fadetime)
59         self.draw2d = Draw_Not;
60 }
61
62
63 void Net_AuXair()
64 {
65     float axh_id;
66     entity axh;
67
68     axh_id = bound(0, ReadByte(), MAX_AXH);
69     axh = AuxiliaryXhair[axh_id];
70
71     if(axh == world || wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
72     {
73         axh               = spawn();
74                 axh.draw2d        = Draw_Not;
75                 axh.drawmask      = MASK_NORMAL;
76                 axh.axh_drawflag  = DRAWFLAG_ADDITIVE;
77                 axh.axh_fadetime  = 0.1;
78                 axh.axh_image     = "gfx/vehicles/axh-ring.tga";
79                 axh.axh_scale     = 1;
80         axh.alpha         = 1;
81                 AuxiliaryXhair[axh_id] = axh;
82     }
83
84     axh.draw2d   = AuxiliaryXhair_Draw2D;
85
86         axh.origin_x = ReadCoord();
87         axh.origin_y = ReadCoord();
88         axh.origin_z = ReadCoord();
89
90         axh.colormod_x = ReadByte() / 255;
91         axh.colormod_y = ReadByte() / 255;
92         axh.colormod_z = ReadByte() / 255;
93     axh.cnt = time;
94 }
95 void Net_AuXair2(float blah)
96 {
97     Net_AuXair();
98 }
99 void Net_VehicleSetup()
100 {
101
102     float hud_id, i;
103     hud_id = bound(HUD_SPIDERBOT, ReadByte(), HUD_RAPTOR);
104
105     // Init auxiliary crosshairs
106 //#if 1
107     entity axh;
108     for(i = 0; i < MAX_AXH; ++i)
109     {
110         axh = AuxiliaryXhair[i];
111         if(axh != world && !wasfreed(axh))  // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
112             remove(axh);
113
114         axh               = spawn();
115                 axh.draw2d        = Draw_Not;
116                 axh.drawmask      = MASK_NORMAL;
117                 axh.axh_drawflag  = DRAWFLAG_ADDITIVE;
118                 axh.axh_fadetime  = 0.1;
119                 axh.axh_image     = "gfx/vehicles/axh-ring.tga";
120                 axh.axh_scale     = 1;
121         axh.alpha         = 1;
122                 AuxiliaryXhair[i] = axh;
123     }
124 /*
125 #else
126     for(i = 0; i < MAX_AXH; ++i)
127     {
128         if(AuxiliaryXhair[i] != world && !wasfreed(AuxiliaryXhair[i]))
129             remove(AuxiliaryXhair[i]);
130
131         AuxiliaryXhair[i]               = spawn();
132                 AuxiliaryXhair[i].draw2d        = Draw_Not;
133                 AuxiliaryXhair[i].drawmask      = MASK_NORMAL;
134                 AuxiliaryXhair[i].axh_drawflag  = DRAWFLAG_ADDITIVE;
135                 AuxiliaryXhair[i].axh_fadetime  = 0.1;
136                 AuxiliaryXhair[i].axh_image     = "gfx/vehicles/axh-ring.tga";
137                 AuxiliaryXhair[i].axh_scale     = 1;
138                 AuxiliaryXhair[i].alpha         = 1;
139     }
140 #endif
141 */
142     switch(hud_id)
143     {
144         case HUD_SPIDERBOT:
145             // Minigun1
146             AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-ring.tga";
147             AuxiliaryXhair[0].axh_scale   = 0.25;
148             // Minigun2
149             AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-ring.tga";
150             AuxiliaryXhair[1].axh_scale   = 0.25;
151             // Rocket
152             AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-special1.tga";
153             AuxiliaryXhair[2].axh_scale   = 0.5;
154             break;
155         case HUD_WAKIZASHI:
156             AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
157             AuxiliaryXhair[0].axh_scale   = 0.5;
158             break;
159         case HUD_RAPTOR:
160             AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-cross.tga";
161             AuxiliaryXhair[0].axh_scale   = 0.5;
162             AuxiliaryXhair[1].alpha       = 0.25;
163             AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-ring.tga";
164             AuxiliaryXhair[1].axh_scale   = 0.5;
165             AuxiliaryXhair[1].alpha       = 0.5;
166             break;
167     }
168 }
169
170 void Vehicles_Precache()
171 {
172         //precache_model("models/ax_shell.mdl");
173         //precache_sound("weapons/brass1.wav");
174 }
175
176
177 void CSQC_SPIDER_HUD()
178 {
179         float rockets, reload, heat, hp, shield;
180         vector picsize, hudloc;
181
182     // Fetch health & ammo stats
183     hp      = bound(0,getstatf(STAT_VEHICLESTAT_HEALTH), 1);
184         shield  = bound(0,getstatf(STAT_VEHICLESTAT_SHIELD), 1);
185         heat    = min(getstatf(STAT_VEHICLESTAT_RELOAD1), 2);
186         rockets =     getstati(STAT_VEHICLESTAT_AMMO2);
187         reload  = min(getstatf(STAT_VEHICLESTAT_RELOAD2), 1);
188
189
190     hudloc_y = 4;
191     hudloc_x = 4;
192     drawfill('130 28 0', ('115 0 0' * hp) + '0 10 0', hp * '0 1 0' + (1 - hp) * '1 0 0', 0.5, DRAWFLAG_NORMAL);
193     picsize = drawgetimagesize(spider_h) * 0.5;
194     drawpic(hudloc, spider_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
195
196     picsize = drawgetimagesize(spider_a2) * 0.5;
197     drawpic(hudloc + '120 96  0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
198
199     drawstring(hudloc + '145 19  0', strcat(ftos(rint(hp * 100)), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
200     drawstring(hudloc + '175 34  0', strcat(ftos(rint(shield * 100)), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
201     drawstring(hudloc + '136 102  0', strcat(ftos(100 - rint(heat * 100)), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
202
203     picsize = drawgetimagesize(spider_a1) * 0.85;
204     if(rockets == 9)
205     {
206         drawpic(hudloc + '132 54  0', spider_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
207         drawstring(hudloc + '179 69 0', strcat(ftos(rint(reload * 100)), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
208     }
209     else
210     {
211         drawpic(hudloc + '132 54  0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
212         drawstring(hudloc + '179 69  0', strcat(ftos(9 - rockets), "/8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
213     }
214
215     picsize = drawgetimagesize(spider_b) * 0.5;
216     hudloc_y = 10.5;
217     hudloc_x = 10.5;
218
219     drawpic(hudloc, spider_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
220     drawpic(hudloc, spider_b, picsize, '0 1 0' * hp + '1 0 0' * (1 - hp), 1, DRAWFLAG_NORMAL);
221     drawpic(hudloc, spider_r, picsize, '1 1 1' * reload + '1 0 0' * (1 - reload), 1, DRAWFLAG_NORMAL);
222     drawpic(hudloc, spider_g, picsize, '1 1 1' * (1 - heat) + '1 0 0' *  heat, 1, DRAWFLAG_NORMAL);
223
224
225         if (scoreboard_showscores)
226         {
227                 HUD_DrawScoreboard();
228                 HUD_DrawCenterPrint();
229     }
230     else
231     {
232
233         /*
234         float movedt, vel;
235         movedt = time - self.move_time;
236         self.move_time = time;
237         vel = (view_origin - lastpos) * (1 / movedt);
238         lastpos  = view_origin;
239         dprint("vel: ", ftos(vel), "  angles: ", vtos(self.angles), "\n");
240         */
241
242         /*
243         dprint("aim1: ", vtos(aim1), "  aim2: ", vtos(aim2), "\n");
244         aim2_x *= -1;
245         makevectors(aim2);
246         te_lightning1(self, view_origin, view_origin + v_forward * MAX_SHOT_DISTANCE);
247         traceline(view_origin, view_origin + v_forward * MAX_SHOT_DISTANCE, MOVE_WORLDONLY, self);
248         aim2 = trace_endpos;
249
250
251         aim1 = aim1 + view_origin;
252
253         // Draw the crosshairs
254         aim1 = project_3d_to_2d(aim1);
255         aim2 = project_3d_to_2d(aim2);
256
257         picsize = 0.5 * drawgetimagesize(SPIDER_CROSS2);
258         aim2 = aim2 - 0.5 * picsize;
259         aim2_z = 0;
260         picsize_z = 0;
261         drawpic(aim2, SPIDER_CROSS2, picsize, '0 1 1', 1, DRAWFLAG_ADDITIVE);
262
263         picsize = 0.5 * drawgetimagesize(SPIDER_CROSS2);
264         aim1 = aim1 - 0.5 * picsize;
265         aim1_z = 0;
266         picsize_z = 0;
267         drawpic(aim1, SPIDER_CROSS2, picsize, '1 0 0', 1, DRAWFLAG_ADDITIVE);
268
269         */
270         picsize = drawgetimagesize(SPIDER_CROSS);
271         picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
272         picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
273
274         drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_ADDITIVE);
275     }
276 }
277
278
279 void CSQC_RAPTOR_HUD()
280 {
281         if(autocvar_r_letterbox)
282         return;
283
284         float reload, hp, shield, energy;
285         vector picsize, hudloc, vel;
286         float movedt;
287     vector where;
288
289
290     if(!dropmark)
291     {
292         dropmark = spawn();
293         dropmark.owner = self;
294     }
295
296         movedt = time - dropmark.move_time;
297         if(movedt)
298         {
299         dropmark.move_time = time;
300         vel = (view_origin - lastpos) * (1 / movedt);
301         lastpos  = view_origin;
302     }
303
304     // Fetch health & ammo stats
305     hp      = bound(0,getstatf(STAT_VEHICLESTAT_HEALTH), 1);
306         shield  = bound(0,getstatf(STAT_VEHICLESTAT_SHIELD), 1);
307         reload  = min(getstatf(STAT_VEHICLESTAT_RELOAD1), 1);
308         energy  = min(getstatf(STAT_VEHICLESTAT_ENERGY),  1);
309
310     // Draw the crosshairs
311     picsize = drawgetimagesize("gfx/vehicles/axh-cross.tga");
312     picsize_x *= 0.75;
313     picsize_y *= 0.75;
314     drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), "gfx/vehicles/axh-cross.tga", picsize, '1 0 0' + '0 1 1' * energy, 0.5, DRAWFLAG_ADDITIVE);
315
316     hudloc_y = 4;
317     hudloc_x = 4;
318
319     picsize = drawgetimagesize(raptor_h) * 0.5;
320     drawpic(hudloc, raptor_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
321
322     picsize = drawgetimagesize(spider_a2) * 0.5;
323     drawpic(hudloc + '120 96  0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
324
325     drawstring(hudloc + '145 19  0', strcat(ftos(rint(hp * 100)), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
326     drawstring(hudloc + '175 34  0', strcat(ftos(rint(shield * 100)), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
327     drawstring(hudloc + '136 102 0', strcat(ftos(rint(energy * 100)), "%"),'15 15 0','0.5 0.5 1', 1, DRAWFLAG_NORMAL);
328
329
330     picsize = drawgetimagesize(spider_a1) * 0.85;
331     if(reload == 1)
332     {
333         drawpic(hudloc + '132 54  0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
334         drawstring(hudloc + '179 69  0', strcat(ftos(rint(reload * 100)), "%"),'14 14 0','0 1 0', 0.5, DRAWFLAG_NORMAL);
335     }
336     else
337     {
338         drawpic(hudloc + '132 54  0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
339         drawstring(hudloc + '179 69  0', strcat(ftos(rint(reload * 100)), "%"),'14 14 0','0 0 1', 1, DRAWFLAG_NORMAL);
340     }
341
342     picsize = drawgetimagesize(raptor_b) * 0.5;
343     hudloc_y = 10.5;
344     hudloc_x = 10.5;
345
346     drawpic(hudloc, raptor_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
347     drawpic(hudloc, raptor_b, picsize, '0 1 0' * hp + '1 0 0' * (1 - hp), 1, DRAWFLAG_NORMAL);
348     drawpic(hudloc, raptor_g1, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
349     drawpic(hudloc, raptor_g2, picsize, '1 1 1' * reload + '1 0 0' *  (1 - reload), 1, DRAWFLAG_NORMAL);
350
351     if(reload == 1)
352     {
353         where = dropmark.origin;
354         setorigin(dropmark, view_origin);
355         dropmark.velocity = vel;
356         tracetoss(dropmark, self);
357
358         // Blend old with new predicted impact to smooth out jumpyness
359         where = project_3d_to_2d(trace_endpos * 0.5 + where * 0.5);
360
361         setorigin(dropmark, trace_endpos);
362         picsize = drawgetimagesize(raptor_d) * 0.2;
363
364         if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
365         {
366             where_x -= picsize_x * 0.5;
367             where_y -= picsize_y * 0.5;
368             where_z = 0;
369             drawpic(where, raptor_d, picsize, '0 2 0', 1, DRAWFLAG_ADDITIVE);
370         }
371         dropmark.cnt = time + 5;
372     }
373     else
374     {
375         if(dropmark.cnt > time)
376         {
377             where = project_3d_to_2d(dropmark.origin);
378             picsize = drawgetimagesize(raptor_d) * 0.25;
379
380             if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
381             {
382                 where_x -= picsize_x * 0.5;
383                 where_y -= picsize_y * 0.5;
384                 where_z = 0;
385                 drawpic(where, raptor_d, picsize, '2 0 0', 1, DRAWFLAG_ADDITIVE);
386             }
387         }
388     }
389
390         if (scoreboard_showscores)
391         {
392                 HUD_DrawScoreboard();
393                 HUD_DrawCenterPrint();
394         }
395
396 }
397
398 #define waki_h "gfx/vehicles/hud_bg.tga"
399 #define waki_b "gfx/vehicles/waki.tga"
400 #define waki_e "gfx/vehicles/waki_e.tga"
401 #define waki_g "gfx/vehicles/waki_guns.tga"
402 #define waki_r "gfx/vehicles/waki_rockets.tga"
403 #define waki_s "gfx/vehicles/shiled.tga"
404
405 #define waki_a1 "gfx/vehicles/sb_rocket.tga"
406 #define waki_a2 "gfx/vehicles/sb_cells.tga"
407
408 void CSQC_WAKIZASHI_HUD()
409 {
410         // 0--1 floats. 1 = 100%, 0.6 = 50%.
411         float health, shield, energy, rockets;
412         vector picsize, hudloc;
413
414     picsize = drawgetimagesize(SPIDER_CROSS);
415     picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
416     picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
417     drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
418
419 /*
420 const float STAT_VEHICLESTAT_HEALTH  = 60;
421 const float STAT_VEHICLESTAT_SHIELD  = 61;
422 const float STAT_VEHICLESTAT_ENERGY  = 62;
423 const float STAT_VEHICLESTAT_AMMO1   = 63;
424 const float STAT_VEHICLESTAT_RELAOD1 = 64;
425 const float STAT_VEHICLESTAT_AMMO2   = 65;
426 const float STAT_VEHICLESTAT_RELOAD2 = 66;
427 */
428     health  = min(getstatf(STAT_VEHICLESTAT_HEALTH),  1);
429         shield  = min(getstatf(STAT_VEHICLESTAT_SHIELD),  1);
430         energy  = min(getstatf(STAT_VEHICLESTAT_ENERGY),  1);
431         rockets = bound(0,getstatf(STAT_VEHICLESTAT_RELOAD1), 1);
432
433     hudloc_y =  4;
434     hudloc_x = 4;
435
436     picsize = drawgetimagesize(waki_h) * 0.5;
437     drawpic(hudloc, waki_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
438
439     picsize = drawgetimagesize(waki_a2) * 0.7;
440     drawpic(hudloc + '116 92  0', waki_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
441
442
443     drawstring(hudloc + '145 19  0', strcat(ftos(rint(health * 100)), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
444     drawstring(hudloc + '175 34  0', strcat(ftos(rint(shield * 100)), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
445
446     drawstring(hudloc + '136 102  0', strcat(ftos(rint(energy * 100)), "%"),'14 14 0','1 1 1', 1, DRAWFLAG_NORMAL);
447
448     picsize = drawgetimagesize(waki_a1) * 0.75;
449     if(rockets == 1)
450     {
451         drawpic(hudloc + '140 55  0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
452         drawpic(hudloc + '144 59  0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
453     }
454     else
455     {
456         drawpic(hudloc + '140 55  0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
457         drawpic(hudloc + '144 59  0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
458         drawstring(hudloc + '165 69 0', strcat(ftos(rint(rockets * 100)), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
459     }
460
461     picsize = drawgetimagesize(waki_b) * 0.5;
462     hudloc_y = 10.5;
463     hudloc_x = 10.5;
464
465     drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
466     drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
467     drawpic(hudloc, waki_r, picsize, '1 1 1' * rockets + '1 0 0' * (1 - rockets), 1, DRAWFLAG_NORMAL);
468     drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' *  (1 - energy), 1, DRAWFLAG_NORMAL);
469
470
471
472         /*
473         p = '0.5 0 0' * (vid_conwidth - (rkt_size * 8));
474         p = p + '0 1 0' * vid_conheight - '0 32 0';
475
476         // Draw health bar
477         p_y += 8;
478         drawfill(p, '256 0 0' * health + '0 8 0' , '0 0.7 0', 0.75, DRAWFLAG_NORMAL);
479         p_x += 256 * health;
480         drawfill(p, '256 0 0' * (1 - health) + '0 8 0' , '0 0 0', 0.75, DRAWFLAG_NORMAL);
481
482         // Draw shiled bar
483         p_x -= 256 * health;
484         p_y += 4;
485         drawfill(p, '256 0 0' * shield + '0 4 0' , '0.25 0.25 1', 0.5, DRAWFLAG_NORMAL);
486
487         // Draw energy
488         //p_x -= 256 * health;
489         p_y -= 8;
490         drawfill(p, '256 0 0' * energy + '0 4 0' , '1 1 1', 0.75, DRAWFLAG_NORMAL);
491
492         // Draw rockets bar
493         p_y += 12;
494         drawfill(p, '256 0 0' * rockets + '0 4 0' , '1 0 0', 0.75, DRAWFLAG_NORMAL);
495         */
496
497
498
499
500         if (scoreboard_showscores)
501         {
502                 HUD_DrawScoreboard();
503                 HUD_DrawCenterPrint();
504         }
505
506 }