From: terencehill Date: Fri, 5 Jun 2020 12:05:54 +0000 (+0200) Subject: Fix and improve crosshair_color_special description X-Git-Tag: xonotic-v0.8.5~946 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=4b8443da3448b5cf9bb3761ae25a8b1591d16d66 Fix and improve crosshair_color_special description --- diff --git a/crosshairs.cfg b/crosshairs.cfg index ae3fec0805..dd3302d76c 100644 --- a/crosshairs.cfg +++ b/crosshairs.cfg @@ -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_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" diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 99549a5755..cb6b623ec2 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1003,7 +1003,7 @@ vector crosshair_getcolor(entity this, float health_stat) 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) { @@ -1013,7 +1013,7 @@ vector crosshair_getcolor(entity this, float health_stat) 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); @@ -1060,7 +1060,7 @@ vector crosshair_getcolor(entity this, float health_stat) break; } - case 3: // crosshair_color_rainbow + case 3: // rainbow/random color { if(time >= rainbow_last_flicker) {