seta crosshair_dot 1
seta crosshair_dot_alpha 1
seta crosshair_dot_size 1
+seta crosshair_pickup 0.25
+seta crosshair_pickup_speed 4
seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair"
seta crosshair_color_override 0 "when 1, crosshair_color_* overrides the per-weapon color"
seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
vector freeze_pmove_org, freeze_input_angles;
entity nightvision_noise, nightvision_noise2;
+float pickup_crosshair_time, pickup_crosshair_size;
+
void CSQC_UpdateView(float w, float h)
{
entity e;
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
if(shottype == SHOTTYPE_HITTEAM)
const float STAT_LEADLIMIT = 47;
const float STAT_BULLETS_LOADED = 48;
const float STAT_NEX_CHARGE = 49;
-const float STAT_HUD = 50;
+const float STAT_LAST_PICKUP = 50;
+const float STAT_HUD = 51;
// see DP source, quakedef.h
const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
self.health = spectatee.health;
self.impulse = 0;
self.items = spectatee.items;
+ self.last_pickup = spectatee.last_pickup;
self.metertime = spectatee.metertime;
self.strength_finished = spectatee.strength_finished;
self.invincible_finished = spectatee.invincible_finished;
.float stats_hit[WEP_MAXCOUNT]; // for hitscan bullets hit
.float stats_fired[WEP_MAXCOUNT]; // for hitscan bullets fired
+.float last_pickup;
+
FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_hit);
FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(stats_fired);
addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
+ addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
if(!Item_GiveTo(self, other))
return;
+ other.last_pickup = time;
+
pointparticles(particleeffectnum("item_pickup"), self.origin, '0 0 0', 1);
if (self.classname == "droppedweapon")