]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Display a warning image when the HUD is in failure mode
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 19:51:20 +0000 (21:51 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 15 Nov 2011 19:51:20 +0000 (21:51 +0200)
data/gfx/hud/bg_power_fail.tga [new file with mode: 0644]
data/qcsrc/client/sbar.qc

diff --git a/data/gfx/hud/bg_power_fail.tga b/data/gfx/hud/bg_power_fail.tga
new file mode 100644 (file)
index 0000000..4c03123
Binary files /dev/null and b/data/gfx/hud/bg_power_fail.tga differ
index 84756fd341f86a96bd52edeadbf6a214ee7d57da..c3de1032e2cc53144f7907f6cee1c8585d0328e8 100644 (file)
@@ -3080,7 +3080,15 @@ void Sbar_Draw (void)
 \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 - 128;\r
+                       warn_pos_y = vid_conheight - vid_conheight / 2.5;\r
+\r
+                       drawpic(warn_pos, "gfx/hud/bg_power_fail", '256 256 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