]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Dim crosshair color and / or alpha when unarmed
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 1 Mar 2011 00:08:30 +0000 (02:08 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 1 Mar 2011 00:08:30 +0000 (02:08 +0200)
data/defaultVoretournament.cfg
data/qcsrc/client/View.qc

index 4ac9a73be8a97a3bf8a80eb247849f4f887a58f3..f563b383b28908c438af42dcf0fee41994c0b39c 100644 (file)
@@ -110,6 +110,8 @@ _cl_playerskin 0
 crosshair 11\r
 seta crosshair_pickup 1 "crosshair grows then shrinks back when picking up an item"\r
 seta crosshair_color_by_health 1 "if enabled, crosshair color will depend on current health"\r
+seta crosshair_unarmed_dim_color 0.5 "dim crosshair color by this amount when we aren't holding a weapon"\r
+seta crosshair_unarmed_dim_alpha 0.5 "dim crosshair alpha by this amount when we aren't holding a weapon"\r
 seta crosshair_pickup_speed 4 "speed of the crosshair pickup effect"\r
 seta crosshair_ring_alpha 0.5 "alpha of the crosshair ammo ring"\r
 seta crosshair_ring_size 3 "size of the crosshair ammo ring"\r
index 674fb9c0bed449ca69c0f03f41018a68fcebfa92..73aaf13ab947c4717491401e3131ce5c1e5eb458 100644 (file)
@@ -1051,6 +1051,15 @@ void CSQC_UpdateView(float w, float h)
                                wcross_alpha = cvar("crosshair_color_alpha");\r
                                wcross_resolution = cvar("crosshair_size");\r
 \r
+                               if(!activeweapon)\r
+                               if(!swallow_indicator)\r
+                               {\r
+                                       if(cvar("crosshair_unarmed_dim_color"))\r
+                                               wcross_color *= cvar("crosshair_unarmed_dim_color");\r
+                                       if(cvar("crosshair_unarmed_dim_alpha"))\r
+                                               wcross_alpha *= cvar("crosshair_unarmed_dim_alpha");\r
+                               }\r
+\r
                                wcross_name = strcat("gfx/crosshair", wcross_style);\r
 \r
                                if(cvar("crosshair_effect_scalefade"))\r