vector freeze_pmove_org, freeze_input_angles;
entity nightvision_noise, nightvision_noise2;
+float pickup_crosshair_time, pickup_crosshair_size;
+float nex_charge_movingavg, nex_charge_current_avg;
+
void CSQC_UpdateView(float w, float h)
{
entity e;
float f, i, j;
vector v, vo;
vector vf_size, vf_min;
+ float a;
vf_size = R_SetView3fv(VF_SIZE);
vf_min = R_SetView3fv(VF_MIN);
{
// apply night vision effect
vector rgb, tc_00, tc_01, tc_10, tc_11;
- float a;
if(!nightvision_noise)
{
wcross_scale = 1;
}
+ if(cvar("crosshair_pickup"))
+ {
+ if(pickup_crosshair_time < getstatf(STAT_LAST_PICKUP))
+ {
+ pickup_crosshair_size = 1;
+ pickup_crosshair_time = getstatf(STAT_LAST_PICKUP);
+ }
+
+ if(pickup_crosshair_size > 0)
+ pickup_crosshair_size -= cvar("crosshair_pickup_speed") * frametime;
+ else
+ pickup_crosshair_size = 0;
+
+ wcross_scale += sin(pickup_crosshair_size) * cvar("crosshair_pickup");
+ }
+
if(shottype == SHOTTYPE_HITENEMY)
wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
- else if(shottype == SHOTTYPE_HITTEAM)
+ if(shottype == SHOTTYPE_HITTEAM)
wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
f = cvar("crosshair_effect_speed");
}
else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
{
+ vector rgb;
+ // indicate how much we're charging right now with an inner circle
+ a = cvar("crosshair_nexvelocity_currentcharge_alpha");
+ nex_charge_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge;
+
+ rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue");
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+
+ // draw the charge
a = cvar("crosshair_nexvelocity_alpha");
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}
void CSQC_RAPTOR_HUD()
{
- float rockets, reload, heat, hp, shield, energy;
+ float reload, hp, shield, energy;
vector picsize, hudloc;
// Fetch health & ammo stats