From: havoc Date: Mon, 24 Sep 2007 18:52:39 +0000 (+0000) Subject: patch for nexuiz from m0rfar to colorize health/armor according to amount X-Git-Tag: xonotic-v0.1.0preview~2892 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc362a57719895a2bf9c858b04acb0ea8bda4d72;p=xonotic%2Fdarkplaces.git patch for nexuiz from m0rfar to colorize health/armor according to amount git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7583 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sbar.c b/sbar.c index e0c7ec87..741e8c9b 100644 --- a/sbar.c +++ b/sbar.c @@ -1238,10 +1238,14 @@ void Sbar_Draw (void) if (cl.stats[STAT_ARMOR] > 0) { Sbar_DrawStretchPic (0, 0, sb_armor[0], sbar_alpha_fg.value, 24, 24); - if(cl.stats[STAT_ARMOR] > 100) - Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,1,1,0,1,0); - else if(cl.stats[STAT_ARMOR] > 25) + if(cl.stats[STAT_ARMOR] > 200) + Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0,1,0,1,0); + else if(cl.stats[STAT_ARMOR] > 100) + Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0.2,1,0.2,1,0); + else if(cl.stats[STAT_ARMOR] > 50) Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0.6,0.7,0.8,1,0); + else if(cl.stats[STAT_ARMOR] > 25) + Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,1,1,0.2,1,0); else Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0.7,0,0,1,0); } @@ -1250,10 +1254,14 @@ void Sbar_Draw (void) if (cl.stats[STAT_HEALTH] != 0) { Sbar_DrawStretchPic (112, 0, sb_health, sbar_alpha_fg.value, 24, 24); - if(cl.stats[STAT_HEALTH] > 100) - Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,1,1,0,1,0); - else if(cl.stats[STAT_HEALTH] > 25) + if(cl.stats[STAT_HEALTH] > 200) + Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0,1,0,1,0); + else if(cl.stats[STAT_HEALTH] > 100) + Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0.2,1,0.2,1,0); + else if(cl.stats[STAT_HEALTH] > 50) Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0.6,0.7,0.8,1,0); + else if(cl.stats[STAT_HEALTH] > 25) + Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,1,1,0.2,1,0); else Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0.7,0,0,1,0); }