]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Add code comments
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 21:37:18 +0000 (23:37 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 21:37:18 +0000 (23:37 +0200)
data/qcsrc/client/sbar.qc

index 0371c39b4157ee7cbaf29e00698991dfd3002ce5..82ce78b94c850f77fe8be8d5759c5450fa160280 100644 (file)
@@ -3078,6 +3078,7 @@ void Sbar_Draw (void)
                fade = 3.2 - 2 * (time - weapontime);\r
                fade = bound(0.7, fade, 1);\r
 \r
+               // when a player's armor is below the necessary level, subsystems will not work\r
                if(getstati(STAT_HEALTH) > 0)\r
                {\r
                        vector warn_pos;\r
@@ -3085,18 +3086,18 @@ void Sbar_Draw (void)
                        warn_pos_y = vid_conheight - vid_conheight / 2.5;\r
                        if(getstati(STAT_ARMOR) < g_power)\r
                        {\r
+                               // subsystems are down\r
                                drawpic(warn_pos - '128 0 0', "gfx/hud/sb_power_fail", '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                drawpic(warn_pos - '16 0 0' + '0 150 0', "gfx/hud/sb_power_fail_icon", '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
-\r
                                power_boot = time + g_power_reboot;\r
-                               return;\r
+                               return; // skip drawing the HUD\r
                        }\r
                        else if(time <= power_boot)\r
                        {\r
+                               // subsystems are rebooting\r
                                drawpic(warn_pos - '128 0 0', "gfx/hud/sb_power_reboot", '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                drawpic(warn_pos - '16 0 0' + '0 150 0', "gfx/hud/sb_power_reboot_icon", '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
-\r
-                               return;\r
+                               return; // skip drawing the HUD\r
                        }\r
                }\r
 \r