All shall be cvared!
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 30 Oct 2010 14:33:23 +0000 (17:33 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 30 Oct 2010 14:33:23 +0000 (17:33 +0300)
defaultXonotic.cfg
qcsrc/client/View.qc

index b89fdda..4e24b0c 100644 (file)
@@ -96,6 +96,10 @@ seta crosshair_size 0.35
 seta crosshair_dot 1
 seta crosshair_dot_alpha 1
 seta crosshair_dot_size 1
+
+seta crosshair_pickup 1
+seta crosshair_pickup_speed 0.01
+
 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"
index df2f52e..8bfccde 100644 (file)
@@ -771,16 +771,19 @@ void CSQC_UpdateView(float w, float h)
                                        wcross_scale = 1;
                                }
 
-                               if(pickup_crosshair_time < getstatf(STAT_PICKUP_CROSSHAIR))
+                               if(cvar("crosshair_pickup"))
                                {
-                                       pickup_crosshair_fade = 1;
-                                       pickup_crosshair_time = getstatf(STAT_PICKUP_CROSSHAIR);
+                                       if(pickup_crosshair_time < getstatf(STAT_PICKUP_CROSSHAIR))
+                                       {
+                                               pickup_crosshair_fade = 1;
+                                               pickup_crosshair_time = getstatf(STAT_PICKUP_CROSSHAIR);
+                                       }
+                                       if(pickup_crosshair_fade > 0)
+                                               pickup_crosshair_fade -= cvar("crosshair_pickup_speed");
+                                       else
+                                               pickup_crosshair_fade = 0;
+                                       wcross_scale += sin(pickup_crosshair_fade) * cvar("crosshair_pickup");
                                }
-                               if(pickup_crosshair_fade > 0)
-                                       pickup_crosshair_fade -= 0.01;
-                               else
-                                       pickup_crosshair_fade = 0;
-                               wcross_scale += sin(pickup_crosshair_fade);
 
                                if(shottype == SHOTTYPE_HITENEMY)
                                        wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0