return;
// Initialize
- vector hudSize = '0 0 0';
- vector hudPos = '0 0 0';
vector tmpSize = '0 0 0';
vector tmpPos = '0 0 0';
else
drawpic_skin(tmpPos, iconAmmo2, tmpSize, '1 1 1', hudAlpha * 0.2, DRAWFLAG_NORMAL);
}
-
- // Bumblebee gunner crosshairs
- if(hud == VEH_BUMBLEBEE.vehicleid)
- {
- tmpSize = '1 1 1' * hud_fontsize;
- tmpPos.x = hudPos.x + hudSize.x * (520/768);
-
- if(!AuxiliaryXhair[1].draw2d)
- {
- tmpPos.y = hudPos.y + hudSize.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);
- drawstring(tmpPos, _("No left gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL);
- }
- }
}
void Vehicles_drawCrosshair(string crosshair)
vector tmpSize = '0 0 0';
vector tmpPos = '0 0 0';
- // Raptor bomb crosshair
- if(hud == VEH_RAPTOR.vehicleid && weapon2mode != RSM_FLARE)
- {
- vector where;
-
- if(!dropmark)
- {
- dropmark = spawn();
- dropmark.owner = self;
- dropmark.gravity = 1;
- }
-
- float reload2 = getstati(STAT_VEHICLESTAT_RELOAD2) * 0.01;
- if(reload2 == 1)
- {
- setorigin(dropmark, pmove_org);
- dropmark.velocity = pmove_vel;
- tracetoss(dropmark, self);
-
- where = project_3d_to_2d(trace_endpos);
-
- setorigin(dropmark, trace_endpos);
- tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size;
-
- if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
- {
- where.x -= tmpSize.x * 0.5;
- where.y -= tmpSize.y * 0.5;
- where.z = 0;
- drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE);
- drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg
- }
- dropmark.cnt = time + 5;
- }
- else
- {
- if(dropmark.cnt > time)
- {
- where = project_3d_to_2d(dropmark.origin);
- tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size * 1.25;
-
- if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
- {
- where.x -= tmpSize.x * 0.5;
- where.y -= tmpSize.y * 0.5;
- where.z = 0;
- drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE);
- drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg
- }
- }
- }
- }
-
// Crosshair
if(crosshair)
{
#ifndef CL_VEHICLES_H
#define CL_VEHICLES_H
+vector hudSize;
+vector hudPos;
+
void Net_AuXair2(float bIsNew);
void Net_VehicleSetup();
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);
+
+ float hudAlpha = autocvar_hud_panel_fg_alpha;
+ 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);
+
+ if(!AuxiliaryXhair[1].draw2d)
+ {
+ tmpPos.y = hudPos.y + hudSize.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);
+ drawstring(tmpPos, _("No left gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL);
+ }
}
METHOD(Bumblebee, vr_crosshair, void(Bumblebee thisveh))
{
default: crosshair = vCROSS_BURST;
}
+ vector tmpSize = '0 0 0';
+ if(weapon2mode != RSM_FLARE)
+ {
+ vector where;
+
+ if(!dropmark)
+ {
+ dropmark = spawn();
+ dropmark.owner = self;
+ dropmark.gravity = 1;
+ }
+
+ float reload2 = getstati(STAT_VEHICLESTAT_RELOAD2) * 0.01;
+ if(reload2 == 1)
+ {
+ setorigin(dropmark, pmove_org);
+ dropmark.velocity = pmove_vel;
+ tracetoss(dropmark, self);
+
+ where = project_3d_to_2d(trace_endpos);
+
+ setorigin(dropmark, trace_endpos);
+ tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size;
+
+ if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
+ {
+ where.x -= tmpSize.x * 0.5;
+ where.y -= tmpSize.y * 0.5;
+ where.z = 0;
+ drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE);
+ drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg
+ }
+ dropmark.cnt = time + 5;
+ }
+ else
+ {
+ if(dropmark.cnt > time)
+ {
+ where = project_3d_to_2d(dropmark.origin);
+ tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size * 1.25;
+
+ if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
+ {
+ where.x -= tmpSize.x * 0.5;
+ where.y -= tmpSize.y * 0.5;
+ where.z = 0;
+ drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE);
+ drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg
+ }
+ }
+ }
+ }
+
Vehicles_drawCrosshair(crosshair);
}
METHOD(Raptor, vr_setup, void(Raptor thisveh))