Show a different fuel icon when owning the fuel_regen
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 13:28:39 +0000 (16:28 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 13:28:39 +0000 (16:28 +0300)
data/gfx/hud/sb_fuel_regen.tga [new file with mode: 0644]
data/qcsrc/client/View.qc
data/qcsrc/client/sbar.qc

diff --git a/data/gfx/hud/sb_fuel_regen.tga b/data/gfx/hud/sb_fuel_regen.tga
new file mode 100644 (file)
index 0000000..c67c269
Binary files /dev/null and b/data/gfx/hud/sb_fuel_regen.tga differ
index c957f0f..3daed15 100644 (file)
@@ -597,7 +597,7 @@ void CSQC_UpdateView(float w, float h)
                        \r
                contentalpha_temp = bound(0, drawframetime / max(0.0001, contentfadetime), 1);\r
                contentavgalpha = contentavgalpha * (1 - contentalpha_temp) + incontent * contentalpha_temp;\r
-               \r
+\r
                if(contentavgalpha)\r
                        drawfill('0 0 0', '1 0 0' * vid_conwidth + '0 1 0' * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);\r
 \r
index d9f805c..e797c18 100644 (file)
@@ -2658,8 +2658,13 @@ string GetAmmoPicture(float i)
 {\r
        switch(i)\r
        {\r
-               case 0: return "gfx/hud/sb_fuel";\r
-               default: return "";\r
+               case 0:\r
+                       if(getstati(STAT_ITEMS) & IT_FUEL_REGEN)\r
+                               return "gfx/hud/sb_fuel_regen";\r
+                       else\r
+                               return "gfx/hud/sb_fuel";\r
+               default:\r
+                       return "";\r
        }\r
 }\r
 \r