]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix and improve crosshair_color_special description
authorterencehill <piuntn@gmail.com>
Fri, 5 Jun 2020 12:05:54 +0000 (14:05 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 5 Jun 2020 12:05:54 +0000 (14:05 +0200)
crosshairs.cfg
qcsrc/client/view.qc

index ae3fec0805b9dfbeeccec68a43bc63d8df6c639f..dd3302d76c060fea5f973c10e5d5011721d1ac51 100644 (file)
@@ -38,7 +38,7 @@ seta crosshair_hittest_scale 1.25 "shrink crosshair if shot is obstructed or aim
 seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed (debug setting, very glitchy!)"
 
 // change color based on special case
 seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed (debug setting, very glitchy!)"
 
 // change color based on special case
-seta crosshair_color_special 1 "special color handling for crosshair... 1 = per-weapon crosshair color (see crosshair_per_weapon), 2 = crosshair changes color based on health, 3 = rainbow/random color selection"
+seta crosshair_color_special 1 "apply a special color for the crosshair: 1 = weapon color (see also crosshair_per_weapon), 2 = a color based on health and armor, 3 = rainbow/random color"
 seta crosshair_color_special_rainbow_delay 0.1
 seta crosshair_color_special_rainbow_brightness 20 "color brightness of the random crosshair colors"
 
 seta crosshair_color_special_rainbow_delay 0.1
 seta crosshair_color_special_rainbow_brightness 20 "color brightness of the random crosshair colors"
 
index 99549a575566077d8d95dc2fccba972ffee49ca3..cb6b623ec208d8d084c071a03a39774486845ee5 100644 (file)
@@ -1003,7 +1003,7 @@ vector crosshair_getcolor(entity this, float health_stat)
        vector wcross_color = '0 0 0';
        switch(autocvar_crosshair_color_special)
        {
        vector wcross_color = '0 0 0';
        switch(autocvar_crosshair_color_special)
        {
-               case 1: // crosshair_color_per_weapon
+               case 1: // weapon color
                {
                        if(this != WEP_Null && hud == HUD_NORMAL)
                        {
                {
                        if(this != WEP_Null && hud == HUD_NORMAL)
                        {
@@ -1013,7 +1013,7 @@ vector crosshair_getcolor(entity this, float health_stat)
                        else { goto normalcolor; }
                }
 
                        else { goto normalcolor; }
                }
 
-               case 2: // crosshair_color_by_health
+               case 2: // color based on health and armor
                {
                        vector v = healtharmor_maxdamage(health_stat, STAT(ARMOR), armorblockpercent, DEATH_WEAPON.m_id);
                        float hp = floor(v.x + 1);
                {
                        vector v = healtharmor_maxdamage(health_stat, STAT(ARMOR), armorblockpercent, DEATH_WEAPON.m_id);
                        float hp = floor(v.x + 1);
@@ -1060,7 +1060,7 @@ vector crosshair_getcolor(entity this, float health_stat)
                        break;
                }
 
                        break;
                }
 
-               case 3: // crosshair_color_rainbow
+               case 3: // rainbow/random color
                {
                        if(time >= rainbow_last_flicker)
                        {
                {
                        if(time >= rainbow_last_flicker)
                        {