From: Mario Date: Sat, 25 Nov 2017 10:26:31 +0000 (+1000) Subject: Take armor into consideration for the crosshair color by health X-Git-Tag: xonotic-v0.8.5~2424 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=406a1ba4139cdd2afaae46ee0590eea4b5a9192d;p=xonotic%2Fxonotic-data.pk3dir.git Take armor into consideration for the crosshair color by health --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 7a0546063..8b44f0417 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -910,7 +910,8 @@ vector crosshair_getcolor(entity this, float health_stat) case 2: // crosshair_color_by_health { - float hp = health_stat; + vector v = healtharmor_maxdamage(health_stat, STAT(ARMOR), armorblockpercent, DEATH_WEAPON.m_id); + float hp = floor(v.x + 1); //x = red //y = green