From 406a1ba4139cdd2afaae46ee0590eea4b5a9192d Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 25 Nov 2017 20:26:31 +1000 Subject: [PATCH] Take armor into consideration for the crosshair color by health --- qcsrc/client/view.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2