]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
First part of reintegrating HUD armor. Text is now positioned properly at all values.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 22:24:48 +0000 (00:24 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 22:24:48 +0000 (00:24 +0200)
data/qcsrc/client/sbar.qc

index 8eafa1e6bba7d0526a2317afd198c340df0c2351..54e1aa14b2cdb5ef1f75169e55d817a85aeaaf32 100644 (file)
@@ -3025,8 +3025,19 @@ void Sbar_Draw (void)
                        }\r
                }\r
 \r
-               vector health_pos;\r
+               vector health_pos, armor_pos;\r
                health_pos = bottom - '77 58 0';\r
+               armor_pos = bottom - '62 68 0';\r
+\r
+               // armor\r
+               x = armor;\r
+               if (x > 0)\r
+               {\r
+                       drawpic(armor_pos + '0 -20.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       if(x < 100) armor_pos_x -= 4.5; // always center\r
+                       if(x < 10) armor_pos_x -= 6.5; // always center\r
+                       Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg);\r
+               }\r
 \r
                // health\r
                x = health;\r