]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/unit/bumblebee.qc
Trim spaces
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / unit / bumblebee.qc
index cf58a8ca9daf0496d2cfa8b56d58629820841f4d..f6cfb65fec8042e037e9da5e887343190bb07abc 100644 (file)
@@ -1,7 +1,11 @@
-#ifdef REGISTER_VEHICLE
-REGISTER_VEHICLE(
+#ifndef VEHICLE_BUMBLEBEE
+#define VEHICLE_BUMBLEBEE
+#include "bumblebee.qh"
+#ifndef MENUQC
+int v_bumblebee(int);
+#endif
+REGISTER_VEHICLE_SIMPLE(
 /* VEH_##id   */ BUMBLEBEE,
-/* function   */ v_bumblebee,
 /* spawnflags */ VHF_DMGSHAKE,
 /* mins,maxs  */ '-245 -130 -130', '230 130 130',
 /* model         */ "models/vehicles/bumblebee_body.dpm",
@@ -10,8 +14,15 @@ REGISTER_VEHICLE(
 /* tags                  */ "", "", "tag_viewport",
 /* netname       */ "bumblebee",
 /* fullname   */ _("Bumblebee")
-);
-#else
+) {
+    this.m_icon = "vehicle_bumble";
+#ifndef MENUQC
+    this.vehicle_func = v_bumblebee;
+#endif
+}
+#endif
+
+#ifdef IMPLEMENTATION
 
 const float BRG_SETUP = 2;
 const float BRG_START = 4;
@@ -286,11 +297,7 @@ void bumblebee_gunner_exit(int _exitflag)
        gunner.phase = time + 5;
        gunner.vehicle_hudmodel.viewmodelforclient = gunner;
 
-       vh_player = player;
-       vh_vehicle = gunner;
-       MUTATOR_CALLHOOK(VehicleExit);
-       player = vh_player;
-       gunner = vh_vehicle;
+       MUTATOR_CALLHOOK(VehicleExit, player, gunner);
 
        player.vehicle = world;
 }
@@ -357,11 +364,7 @@ bool bumblebee_gunner_enter()
 
        CSQCVehicleSetup(player, player.hud);
 
-       vh_player = player;
-       vh_vehicle = gunner;
-       MUTATOR_CALLHOOK(VehicleEnter);
-       player = vh_player;
-       gunner = vh_vehicle;
+       MUTATOR_CALLHOOK(VehicleEnter, player, gunner);
 
        return true;
 }
@@ -427,7 +430,7 @@ float bumblebee_pilot_frame()
 {
        entity pilot, vehic;
        vector newvel;
-       
+
        if(intermission_running)
        {
                self.vehicle.velocity = '0 0 0';
@@ -597,7 +600,7 @@ float bumblebee_pilot_frame()
 
                                                        trace_ent.health = min(trace_ent.health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, autocvar_g_vehicle_bumblebee_healgun_hmax);
                                                }
-                                               else if(trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
+                                               else if(IS_TURRET(trace_ent))
                                                {
                                                        if(trace_ent.health  <= trace_ent.max_health && autocvar_g_vehicle_bumblebee_healgun_hps)
                                                                trace_ent.health = min(trace_ent.health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, trace_ent.max_health);
@@ -658,13 +661,13 @@ void bumblebee_land()
                self.think      = vehicles_think;
 
        self.nextthink = time;
-       
+
        CSQCMODEL_AUTOUPDATE();
 }
 
 void bumblebee_exit(float eject)
 {
-       if(self.owner.vehicleid == VEH_BUMBLEBEE)
+       if(self.owner.vehicleid == VEH_BUMBLEBEE.vehicleid)
        {
                bumblebee_gunner_exit(eject);
                return;
@@ -677,7 +680,7 @@ void bumblebee_exit(float eject)
                self.think = bumblebee_land;
                self.nextthink  = time;
        }
-       
+
        self.movetype = MOVETYPE_TOSS;
 
        if(!self.owner)
@@ -714,7 +717,7 @@ void bumblebee_blowup()
                                 DEATH_VH_BUMB_DEATH, world);
 
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-       pointparticles(particleeffectnum("explosion_big"), (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
+       Send_Effect("explosion_big", (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
 
        if(self.owner.deadflag == DEAD_DYING)
                self.owner.deadflag = DEAD_DEAD;
@@ -730,7 +733,7 @@ void bumblebee_diethink()
        if(random() < 0.1)
        {
                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
-               pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+               Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
        }
 
        self.nextthink = time + 0.1;
@@ -779,7 +782,7 @@ float v_bumblebee(float req)
                {
                        if(autocvar_g_vehicle_bumblebee_bouncepain)
                                vehicles_impact(autocvar_g_vehicle_bumblebee_bouncepain_x, autocvar_g_vehicle_bumblebee_bouncepain_y, autocvar_g_vehicle_bumblebee_bouncepain_z);
-                               
+
                        return true;
                }
                case VR_ENTER:
@@ -793,12 +796,12 @@ float v_bumblebee(float req)
                {
                        self.angles_z *= 0.8;
                        self.angles_x *= 0.8;
-                       
+
                        self.nextthink = time;
-                       
+
                        if(!self.owner)
                        {
-                               entity oldself = self;          
+                               entity oldself = self;
                                if(self.gunner1)
                                {
                                        self = self.gunner1;
@@ -811,7 +814,7 @@ float v_bumblebee(float req)
                                        other = oldother;
                                        return true;
                                }
-                               
+
                                if(self.gunner2)
                                {
                                        self = self.gunner2;
@@ -823,9 +826,9 @@ float v_bumblebee(float req)
                                        self.touch();
                                        other = oldother;
                                        return true;
-                               }               
+                               }
                        }
-                       
+
                        return true;
                }
                case VR_DEATH:
@@ -837,7 +840,7 @@ float v_bumblebee(float req)
                        // Hide beam
                        if(self.gun3.enemy || !wasfreed(self.gun3.enemy))
                                self.gun3.enemy.effects |= EF_NODRAW;
-                       
+
                        if(self.gunner1)
                        {
                                self = self.gunner1;
@@ -865,7 +868,7 @@ float v_bumblebee(float req)
                                _body.touch = bumblebee_blowup;
                        else
                                _body.touch = func_null;
-                               
+
                        _body.think = bumblebee_diethink;
                        _body.nextthink = time;
                        _body.wait = time + 2 + (random() * 8);
@@ -874,8 +877,8 @@ float v_bumblebee(float req)
                        _body.scale = 1.5;
                        _body.angles = self.angles;
 
-                       pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
-                       
+                       Send_Effect("explosion_medium", findbetterlocation(self.origin, 16), '0 0 0', 1);
+
                        self.health                     = 0;
                        self.event_damage       = func_null;
                        self.solid                      = SOLID_NOT;
@@ -949,14 +952,14 @@ float v_bumblebee(float req)
                                setorigin(self.gun2.vehicle_viewport, '-85 0 50');
 
                                self.scale = 1.5;
-                               
+
                                // Raygun beam
                                if(self.gun3.enemy == world)
-                               {                       
+                               {
                                        self.gun3.enemy = spawn();
                                        Net_LinkEntity(self.gun3.enemy, true, 0, bumble_raygun_send);
-                                       self.gun3.enemy.SendFlags = BRG_SETUP;                  
-                                       self.gun3.enemy.cnt = autocvar_g_vehicle_bumblebee_raygun;                      
+                                       self.gun3.enemy.SendFlags = BRG_SETUP;
+                                       self.gun3.enemy.cnt = autocvar_g_vehicle_bumblebee_raygun;
                                        self.gun3.enemy.effects = EF_NODRAW | EF_LOWPRECISION;
                                }
                        }
@@ -966,9 +969,9 @@ float v_bumblebee(float req)
                        self.solid = SOLID_BBOX;
                        self.movetype = MOVETYPE_TOSS;
                        self.damageforcescale = 0.025;
-                       
+
                        self.PlayerPhysplug = bumblebee_pilot_frame;
-                       
+
                        setorigin(self, self.origin + '0 0 25');
                        return true;
                }
@@ -986,13 +989,13 @@ float v_bumblebee(float req)
 
                        if(autocvar_g_vehicle_bumblebee_health_regen)
                                self.vehicle_flags |= VHF_HEALTHREGEN;
-                               
+
                        self.vehicle_exit = bumblebee_exit;
                        self.respawntime = autocvar_g_vehicle_bumblebee_respawntime;
                        self.vehicle_health = autocvar_g_vehicle_bumblebee_health;
                        self.max_health = self.vehicle_health;
                        self.vehicle_shield = autocvar_g_vehicle_bumblebee_shield;
-                               
+
                        return true;
                }
                case VR_PRECACHE:
@@ -1014,130 +1017,12 @@ float v_bumblebee(float req)
 #endif // SVQC
 #ifdef CSQC
 
-#define bumb_ico  "gfx/vehicles/bumb.tga"
-#define bumb_lgun  "gfx/vehicles/bumb_lgun.tga"
-#define bumb_rgun  "gfx/vehicles/bumb_rgun.tga"
-
-#define bumb_gun_ico  "gfx/vehicles/bumb_side.tga"
-#define bumb_gun_gun  "gfx/vehicles/bumb_side_gun.tga"
-
 void CSQC_BUMBLE_GUN_HUD()
 {
-       if(autocvar_r_letterbox)
-               return;
-
-       vector picsize, hudloc = '0 0 0', pic2size, picloc;
-
-       // Fetch health & ammo stats
-       HUD_GETVEHICLESTATS
-
-       picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-       hudloc_y = vid_conheight - picsize_y;
-       hudloc_x = vid_conwidth * 0.5 - picsize_x * 0.5;
-
-       drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
-
-       shield  *= 0.01;
-       vh_health  *= 0.01;
-       energy  *= 0.01;
-       reload1 *= 0.01;
-
-       pic2size = draw_getimagesize(bumb_gun_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
-       picloc = picsize * 0.5 - pic2size * 0.5;
-
-       if(vh_health < 0.25)
-               drawpic(hudloc + picloc, bumb_gun_ico, pic2size,  '1 0 0' + '0 1 1' * sin(time * 8),  1, DRAWFLAG_NORMAL);
-       else
-               drawpic(hudloc + picloc, bumb_gun_ico, pic2size,  '1 1 1' * vh_health  + '1 0 0' * (1 - vh_health),  1, DRAWFLAG_NORMAL);
-
-       drawpic(hudloc + picloc, bumb_gun_gun, pic2size, '1 1 1' * energy   + '1 0 0' * (1 - energy),   1, DRAWFLAG_NORMAL);
-       drawpic(hudloc + picloc, hud_sh, pic2size,  '1 1 1', shield, DRAWFLAG_NORMAL);
-
-// Health bar
-       picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
-       picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
-       drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - vh_health)), 0, vid_conwidth, vid_conheight);
-       drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL);
-       drawresetcliparea();
-// ..  and icon
-       picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
-       picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
-       if(vh_health < 0.25)
-       {
-               if(alarm1time < time)
-               {
-                       alarm1time = time + 2;
-                       vehicle_alarm(self, CH_PAIN_SINGLE, "vehicles/alarm.wav");
-               }
-
-               drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-       }
-       else
-       {
-               drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-               if(alarm1time)
-               {
-                       vehicle_alarm(self, CH_PAIN_SINGLE, "misc/null.wav");
-                       alarm1time = 0;
-               }
-       }
-
-// Shield bar
-       picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
-       picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
-       drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - shield)), 0, vid_conwidth, vid_conheight);
-       drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-       drawresetcliparea();
-// ..  and icon
-       picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
-       picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
-       if(shield < 0.25)
-       {
-               if(alarm2time < time)
-               {
-                       alarm2time = time + 1;
-                       vehicle_alarm(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav");
-               }
-               drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-       }
-       else
-       {
-               drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-               if(alarm2time)
-               {
-                       vehicle_alarm(self, CH_TRIGGER_SINGLE, "misc/null.wav");
-                       alarm2time = 0;
-               }
-       }
-
-// Gun bar
-       picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
-       picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
-       drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * energy, vid_conheight);
-       drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-       drawresetcliparea();
-
-// ..  and icon
-       picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale;
-       picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
-       if(energy < 0.2)
-               drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-       else
-               drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-
-       if (scoreboard_showscores)
-               HUD_DrawScoreboard();
-       /*
-       else
-       {
-               picsize = draw_getimagesize(waki_xhair);
-               picsize_x *= 0.5;
-               picsize_y *= 0.5;
-
-
-               drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-       }
-       */
+       Vehicles_drawHUD("vehicle_gunner", "vehicle_gunner_weapon1", string_null,
+                                        "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
+                                        string_null, '0 0 0',
+                                        string_null);
 }
 
 void bumble_raygun_draw()
@@ -1222,166 +1107,17 @@ float v_bumblebee(float req)
        {
                case VR_HUD:
                {
-                       if(autocvar_r_letterbox)
-                               return true;
-
-                       vector picsize, hudloc = '0 0 0', pic2size, picloc;
-
-                       // Fetch health & ammo stats
-                       HUD_GETVEHICLESTATS
-
-                       picsize = draw_getimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
-                       hudloc_y = vid_conheight - picsize_y;
-                       hudloc_x = vid_conwidth * 0.5 - picsize_x * 0.5;
-
-                       drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
-
-                       shield  *= 0.01;
-                       vh_health  *= 0.01;
-                       energy  *= 0.01;
-                       reload1 *= 0.01;
-
-                       pic2size = draw_getimagesize(bumb_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
-                       picloc = picsize * 0.5 - pic2size * 0.5;
-
-                       if(vh_health < 0.25)
-                               drawpic(hudloc + picloc, bumb_ico, pic2size,  '1 0 0' + '0 1 1' * sin(time * 8),  1, DRAWFLAG_NORMAL);
-                       else
-                               drawpic(hudloc + picloc, bumb_ico, pic2size,  '1 1 1' * vh_health  + '1 0 0' * (1 - vh_health),  1, DRAWFLAG_NORMAL);
-
-                       drawpic(hudloc + picloc, bumb_lgun, pic2size, '1 1 1' * energy   + '1 0 0' * (1 - energy),   1, DRAWFLAG_NORMAL);
-                       drawpic(hudloc + picloc, bumb_lgun, pic2size, '1 1 1' * energy   + '1 0 0' * (1 - energy),   1, DRAWFLAG_NORMAL);
-                       drawpic(hudloc + picloc, hud_sh, pic2size,  '1 1 1', shield, DRAWFLAG_NORMAL);
-
-               // Health bar
-                       picsize = draw_getimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
-                       picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
-                       drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - vh_health)), 0, vid_conwidth, vid_conheight);
-                       drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL);
-                       drawresetcliparea();
-               // ..  and icon
-                       picsize = draw_getimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
-                       picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
-                       if(vh_health < 0.25)
-                       {
-                               if(alarm1time < time)
-                               {
-                                       alarm1time = time + 2;
-                                       vehicle_alarm(self, CH_PAIN_SINGLE, "vehicles/alarm.wav");
-                               }
-
-                               drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-                       }
-                       else
-                       {
-                               drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-                               if(alarm1time)
-                               {
-                                       vehicle_alarm(self, CH_PAIN_SINGLE, "misc/null.wav");
-                                       alarm1time = 0;
-                               }
-                       }
-
-               // Shield bar
-                       picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
-                       picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
-                       drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - shield)), 0, vid_conwidth, vid_conheight);
-                       drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-                       drawresetcliparea();
-               // ..  and icon
-                       picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
-                       picsize = draw_getimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
-                       if(shield < 0.25)
-                       {
-                               if(alarm2time < time)
-                               {
-                                       alarm2time = time + 1;
-                                       vehicle_alarm(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav");
-                               }
-                               drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-                       }
-                       else
-                       {
-                               drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-                               if(alarm2time)
-                               {
-                                       vehicle_alarm(self, CH_TRIGGER_SINGLE, "misc/null.wav");
-                                       alarm2time = 0;
-                               }
-                       }
-
-                       ammo1 *= 0.01;
-                       ammo2 *= 0.01;
-
-               // Gunner1 bar
-                       picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
-                       picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
-                       drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * ammo1, vid_conheight);
-                       drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-                       drawresetcliparea();
-
-               // Right gunner slot occupied?
-                       if(!AuxiliaryXhair[1].draw2d)
-                       {
-                               shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), false, '1 0 0' * picsize_y + '0 1 0' * picsize_y));
-                               drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
-                               drawstring(hudloc + picloc + '1 0 0' * shield, _("No right gunner!"), '1 0 0' * picsize_y + '0 1 0' * picsize_y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL);
-                       }
-
-               // ..  and icon
-                       picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale;
-                       picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
-                       if(ammo1 < 0.2)
-                               drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-                       else
-                               drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-
-               // Gunner2 bar
-                       picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
-                       picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
-                       drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * ammo2, vid_conheight);
-                       drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-                       drawresetcliparea();
-               // Left gunner slot occupied?
-                       if(!AuxiliaryXhair[2].draw2d)
-                       {
-                               shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), false, '1 0 0' * picsize_y + '0 1 0' * picsize_y));
-                               drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
-                               drawstring(hudloc + picloc + '1 0 0' * shield, _("No left gunner!"), '1 0 0' * picsize_y + '0 1 0' * picsize_y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL);
-                       }
-
-               // ..  and icon
-                       picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale;
-                       picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
-                       if(ammo2 < 0.2)
-                               drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-                       else
-                               drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-
-                       if (scoreboard_showscores)
-                               HUD_DrawScoreboard();
-                       else
-                       {
-                               picsize = draw_getimagesize(waki_xhair);
-                               picsize_x *= 0.5;
-                               picsize_y *= 0.5;
-                               drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-                       }
+                       Vehicles_drawHUD(VEH_BUMBLEBEE.m_icon, "vehicle_bumble_weapon1", "vehicle_bumble_weapon2",
+                                                        "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
+                                                        "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
+                                                        vCROSS_HEAL);
                        return true;
                }
                case VR_SETUP:
                {
-                       // raygun-locked
-                       AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
-                       AuxiliaryXhair[0].axh_scale   = 0.5;
-
-                       // Gunner1
-                       AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-target.tga";
-                       AuxiliaryXhair[1].axh_scale   = 0.75;
-
-                       // Gunner2
-                       AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-target.tga";
-                       AuxiliaryXhair[2].axh_scale   = 0.75;
+                       AuxiliaryXhair[0].axh_image = vCROSS_LOCK;  // Raygun-locked
+                       AuxiliaryXhair[1].axh_image = vCROSS_BURST; // Gunner1
+                       AuxiliaryXhair[2].axh_image = vCROSS_BURST; // Gunner2
                        return true;
                }
                case VR_PRECACHE: