]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/vehicles/vehicle/bumblebee.qc
Weapons: add a second .weaponentity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / vehicles / vehicle / bumblebee.qc
index 5b8df88c49dde0c51dce0a720fefe9b236861879..6e9099a175a502ad1d569aa52beb2bb9e554cbd9 100644 (file)
@@ -174,13 +174,13 @@ float bumblebee_gunner_frame()
 
        if(!forbidWeaponUse(gunner))
        if(gunner.BUTTON_ATCK)
-               if(time > gun.attack_finished_single)
+               if(time > gun.attack_finished_single[0])
                        if(gun.vehicle_energy >= autocvar_g_vehicle_bumblebee_cannon_cost)
                        {
                                gun.vehicle_energy -= autocvar_g_vehicle_bumblebee_cannon_cost;
                                bumblebee_fire_cannon(gun, "fire", gunner);
                                gun.delay = time;
-                               gun.attack_finished_single = time + autocvar_g_vehicle_bumblebee_cannon_refire;
+                               gun.attack_finished_single[0] = time + autocvar_g_vehicle_bumblebee_cannon_refire;
                        }
 
        VEHICLE_UPDATE_PLAYER(gunner, health, bumblebee);
@@ -557,7 +557,7 @@ float bumblebee_pilot_frame()
                {
                        if(autocvar_g_vehicle_bumblebee_raygun)
                        {
-                               Damage(trace_ent, vehic, pilot, autocvar_g_vehicle_bumblebee_raygun_dps * sys_frametime, DEATH_GENERIC, trace_endpos, v_forward * autocvar_g_vehicle_bumblebee_raygun_fps * sys_frametime);
+                               Damage(trace_ent, vehic, pilot, autocvar_g_vehicle_bumblebee_raygun_dps * sys_frametime, DEATH_GENERIC.m_id, trace_endpos, v_forward * autocvar_g_vehicle_bumblebee_raygun_fps * sys_frametime);
                                vehic.vehicle_energy -= autocvar_g_vehicle_bumblebee_raygun_aps * sys_frametime;
                        }
                        else
@@ -698,7 +698,7 @@ void bumblebee_blowup()
                                 autocvar_g_vehicle_bumblebee_blowup_edgedamage,
                                 autocvar_g_vehicle_bumblebee_blowup_radius, self, world,
                                 autocvar_g_vehicle_bumblebee_blowup_forceintensity,
-                                DEATH_VH_BUMB_DEATH, world);
+                                DEATH_VH_BUMB_DEATH.m_id, world);
 
        sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
        Send_Effect(EFFECT_EXPLOSION_BIG, (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
@@ -966,17 +966,17 @@ void CSQC_BUMBLE_GUN_HUD()
                        float blinkValue = 0.55 + sin(time * 7) * 0.45;
                        vector tmpPos  = '0 0 0';
                        vector tmpSize = '1 1 1' * hud_fontsize;
-                       tmpPos.x = hudPos.x + hudSize.x * (520/768);
+                       tmpPos.x = vehicleHud_Pos.x + vehicleHud_Size.x * (520/768);
 
                        if(!AuxiliaryXhair[1].draw2d)
                        {
-                               tmpPos.y = hudPos.y + hudSize.y * (96/256) - tmpSize.y;
+                               tmpPos.y = vehicleHud_Pos.y + vehicleHud_Size.y * (96/256) - tmpSize.y;
                                drawstring(tmpPos, _("No right gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL);
                        }
 
                        if(!AuxiliaryXhair[2].draw2d)
                        {
-                               tmpPos.y = hudPos.y + hudSize.y * (160/256);
+                               tmpPos.y = vehicleHud_Pos.y + vehicleHud_Size.y * (160/256);
                                drawstring(tmpPos, _("No left gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL);
                        }
                }