seta crosshair_color_by_health 0 "if enabled, crosshair color will depend on current health"
seta crosshair_color_per_weapon 1 "when 1, each gun will display the crosshair with a different color"
+// change color randomly on a timer
+seta crosshair_rainbow 0
+seta crosshair_rainbow_delay 0.1
+seta crosshair_rainbow_brightness 2 "color brightness of the random crosshair colors"
+
// ===============================
// Per weapon crosshair settings
float checkfail[16];
+float last_flicker;
+vector previous_color;
+
#define BUTTON_3 4
#define BUTTON_4 8
float cl_notice_run();
if (ring_value)
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_image, ring_value, ring_rgb, wcross_alpha * ring_alpha, DRAWFLAG_ADDITIVE);
}
+
+ if(autocvar_crosshair_rainbow)
+ {
+ if(time >= last_flicker)
+ {
+ previous_color = randomvec() * autocvar_crosshair_rainbow_brightness;
+ last_flicker = time + autocvar_crosshair_rainbow_delay;
+ }
+ wcross_color = previous_color;
+ }
#define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
do \
float autocvar_crosshair_ring_reload_alpha;
float autocvar_crosshair_ring_reload_size;
float autocvar_crosshair_size;
+float autocvar_crosshair_rainbow;
+var float autocvar_crosshair_rainbow_brightness = 2;
+var float autocvar_crosshair_rainbow_delay = 0.1;
float autocvar_ekg;
float autocvar_fov;
float autocvar_g_balance_damagepush_speedfactor;