Code comments
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 16:54:50 +0000 (18:54 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 28 Feb 2011 16:54:50 +0000 (18:54 +0200)
data/qcsrc/client/sbar.qc

index fb383ad753011e020f30f3c928919863c6ec3bd3..1ee371a25f367acfe1ad9da7260e037bbdba1319 100644 (file)
@@ -3070,19 +3070,18 @@ void Sbar_Draw (void)
                                        drawpic(pos - '98 18 0', GetAmmoPicture(i), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                        weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
 \r
                                        drawpic(pos - '98 18 0', GetAmmoPicture(i), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                        weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
 \r
+                                       // if the weapon we're holding is reloadable, show both its ammo and load\r
                                        if(weapon_clipsize)\r
                                        {\r
                                                weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
                                        if(weapon_clipsize)\r
                                        {\r
                                                weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
-                                               if(weapon_clipload < 0)\r
+                                               if(weapon_clipload < 0) // we're reloading\r
                                                        drawstring(pos - '124 23 0', "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                                else\r
                                                        Sbar_DrawXNum(pos - '132 23 0', weapon_clipload, 2, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                                Sbar_DrawXNum(pos - '137 7 0', a, 3, 0, 12, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                        }\r
                                        else\r
                                                        drawstring(pos - '124 23 0', "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                                else\r
                                                        Sbar_DrawXNum(pos - '132 23 0', weapon_clipload, 2, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                                Sbar_DrawXNum(pos - '137 7 0', a, 3, 0, 12, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                        }\r
                                        else\r
-                                       {\r
                                                Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                                Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                                       }\r
                                }\r
                        }\r
                }\r
                                }\r
                        }\r
                }\r