]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Changing this to white by default was stupid- Add new feature to make it
authorSamual Lenks <samual@xonotic.org>
Sun, 16 Sep 2012 03:16:38 +0000 (23:16 -0400)
committerSamual Lenks <samual@xonotic.org>
Sun, 16 Sep 2012 03:16:38 +0000 (23:16 -0400)
red normally, but white if the per-weapon crosshair colors are enabled.

crosshairs.cfg
qcsrc/client/View.qc
qcsrc/client/autocvars.qh

index d6c3ebf0975e23f810b9e3799f9d0e9319b13ef6..5e071a5874416416844c13623393c3dcd5ffb726 100644 (file)
@@ -26,7 +26,8 @@ seta crosshair_pickup_speed 4
 
 // hit indication animation settings
 seta crosshair_hitindication 0.5
-seta crosshair_hitindication_color "10 10 10"
+seta crosshair_hitindication_color "10 -10 -10"
+seta crosshair_hitindication_per_weapon_color "10 10 10"
 seta crosshair_hitindication_speed 5
 
 // hit testing/tracing for special effects for the crosshair
index 0dd898aad6039407543f36e1e20c11d00024a2dd..46d116cbd74dd0d8e572973621a75e35164766e6 100644 (file)
@@ -1183,7 +1183,8 @@ void CSQC_UpdateView(float w, float h)
 
                        if(autocvar_crosshair_hitindication)
                        {
-                               vector hitindication_color = stov(autocvar_crosshair_hitindication_color);
+                               vector hitindication_color = ((autocvar_crosshair_color_per_weapon) ? stov(autocvar_crosshair_hitindication_per_weapon_color) : stov(autocvar_crosshair_hitindication_color));
+                               
                                if(hitindication_crosshair_time < hit_time)
                                {
                                        if(time - hit_time < MAX_TIME_DIFF) // don't trigger the animation if it's too old
index 9ebc80a4b67d356ca567ad58a4cbd4804858df6c..225bfa9d33eb708a33fc699bdae2d9da5ddf8e74 100644 (file)
@@ -96,6 +96,7 @@ float autocvar_crosshair_effect_speed;
 var float autocvar_crosshair_enabled = 1;
 float autocvar_crosshair_hitindication;
 string autocvar_crosshair_hitindication_color;
+string autocvar_crosshair_hitindication_per_weapon_color;
 float autocvar_crosshair_hitindication_speed;
 float autocvar_crosshair_hittest;
 float autocvar_crosshair_hittest_blur;