From: Samual Lenks Date: Sun, 16 Sep 2012 03:16:38 +0000 (-0400) Subject: Changing this to white by default was stupid- Add new feature to make it X-Git-Tag: xonotic-v0.7.0~221 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9b126aee2558f43cca29571fe9e8ac75a470bfa;p=xonotic%2Fxonotic-data.pk3dir.git Changing this to white by default was stupid- Add new feature to make it red normally, but white if the per-weapon crosshair colors are enabled. --- diff --git a/crosshairs.cfg b/crosshairs.cfg index d6c3ebf09..5e071a587 100644 --- a/crosshairs.cfg +++ b/crosshairs.cfg @@ -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 diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 0dd898aad..46d116cbd 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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 diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 9ebc80a4b..225bfa9d3 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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;