float vote_alpha;\r
float vote_change; // "time" when vote_active changed\r
\r
+vector colortrans_current;\r
+vector Stomachstatus_Colortrans(vector target_color)\r
+{\r
+ local float step;\r
+ step = 0.0125;\r
+\r
+ if(colortrans_current_x > target_color_x + step)\r
+ colortrans_current_x -= step;\r
+ else if(colortrans_current_x < target_color_x - step)\r
+ colortrans_current_x += step;\r
+\r
+ if(colortrans_current_y > target_color_y + step)\r
+ colortrans_current_y -= step;\r
+ else if(colortrans_current_y < target_color_y - step)\r
+ colortrans_current_y += step;\r
+\r
+ if(colortrans_current_z > target_color_z + step)\r
+ colortrans_current_z -= step;\r
+ else if(colortrans_current_z < target_color_z - step)\r
+ colortrans_current_z += step;\r
+\r
+ return colortrans_current;\r
+}\r
+\r
void Sbar_Draw (void)\r
{\r
// vectors for top right, bottom right, bottom and bottom left corners\r
}\r
if(getstati(STAT_STOMACH_EATEN))\r
{\r
- drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', '1 0 0', sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans('1 0 0'), sbar_alpha_bg, DRAWFLAG_NORMAL);\r
drawstring(bottomleft - '-80 168 0', "predator:", '8 8 0', '0 0 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else\r
{\r
- drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', '0 1 0', sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+ drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans('0 1 0'), sbar_alpha_bg, DRAWFLAG_NORMAL);\r
drawstring(bottomleft - '-80 168 0', "self:", '8 8 0', '0 0 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r