]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/sbar.qc
Display an icon for the power fail menu. Currently the armor icon
[voretournament/voretournament.git] / data / qcsrc / client / sbar.qc
index 40171815fb9890d12e0204ff9493b0c1117b7d7d..48e52cc997caed66732047ece1ae07332d771486 100644 (file)
@@ -3078,6 +3078,19 @@ void Sbar_Draw (void)
                fade = 3.2 - 2 * (time - weapontime);\r
                fade = bound(0.7, fade, 1);\r
 \r
+               if(getstati(STAT_HEALTH) > 0)\r
+               if(getstati(STAT_ARMOR) < g_power)\r
+               {\r
+                       vector warn_pos;\r
+                       warn_pos_x = vid_conwidth / 2;\r
+                       warn_pos_y = vid_conheight - vid_conheight / 2.5;\r
+\r
+                       drawpic(warn_pos - '128 0 0', "gfx/hud/bg_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, DRAWFLAG_NORMAL);\r
+\r
+                       return;\r
+               }\r
+\r
                if(g_vore) // only when the vore system is active\r
                {\r
                        // draw the stomach board\r
@@ -3181,10 +3194,6 @@ void Sbar_Draw (void)
                        Sbar_PrintStomachboardItemPred(bottomleft - '-76 150 0', pred);\r
                }\r
 \r
-//             if(getstati(STAT_HEALTH) > 0)\r
-//             if(getstati(STAT_ARMOR) < g_power)\r
-//                     return;\r
-\r
                // draw status, scores, timer, and ring\r
                Sbar_Status();\r
                Sbar_Score();\r