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"
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)
{
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);
break;
}
- case 3: // crosshair_color_rainbow
+ case 3: // rainbow/random color
{
if(time >= rainbow_last_flicker)
{