sbar_field_icon2_alpha = 1;\r
switch(field)\r
{\r
+ case ST_HIGHLIGHT:\r
+ return ""; // the returned value is not used, we only need the field\r
+\r
case ST_NAME:\r
return GetPlayerName(pl.sv_entnum);\r
\r
float fieldcounter;\r
void Sbar_PrintStomachboardItem(vector pos, entity pl)\r
{\r
- // list the players in the stomach\r
+ // lists all players in the stomach\r
\r
string str;\r
- float f, field;\r
+ float f, field, field_number;\r
+ field_number = 3; // the number of components each row has\r
\r
- for(fieldcounter = 1; fieldcounter <= 2; ++fieldcounter)\r
+ for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter)\r
{\r
field = -fieldcounter;\r
if(field == SP_SEPARATOR)\r
\r
str = Sbar_GetStomachField(pl, field);\r
\r
- if(field == ST_NAME) // do this for one field, or we get multiple highlights in the same spot\r
+ // row highlighting\r
+ if(field == ST_HIGHLIGHT)\r
{\r
if(getstati(STAT_STOMACH_EATEN))\r
drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color2")), cvar("sbar_stomachboard_highlight_alpha"), DRAWFLAG_NORMAL);\r
}\r
\r
float fieldcounter2;\r
-void Sbar_PrintStomachboardItem2(vector pos, entity pl)\r
+void Sbar_PrintStomachboardItemPred(vector pos, entity pl)\r
{\r
- // show the name of our eater\r
+ // shows the name of our eater\r
\r
string str;\r
- float f, field;\r
+ float f, field, field_number;\r
+ field_number = 1; // the number of components each row has\r
\r
- for(fieldcounter2 = 1; fieldcounter2 <= 2; ++fieldcounter2)\r
+ for(fieldcounter2 = 1; fieldcounter2 <= field_number; ++fieldcounter2)\r
{\r
field = -fieldcounter2;\r
if(field == SP_SEPARATOR)\r
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
+vector stomachstatus_colorfade_current;\r
+vector StomachStatus_ColorFade(vector target_color)\r
{\r
local float step;\r
step = cvar("sbar_stomachboard_status_fade");\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
+ if(stomachstatus_colorfade_current_x >= target_color_x + step)\r
+ stomachstatus_colorfade_current_x -= step;\r
+ else if(stomachstatus_colorfade_current_x <= target_color_x - step)\r
+ stomachstatus_colorfade_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
+ if(stomachstatus_colorfade_current_y >= target_color_y + step)\r
+ stomachstatus_colorfade_current_y -= step;\r
+ else if(stomachstatus_colorfade_current_y <= target_color_y - step)\r
+ stomachstatus_colorfade_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
+ if(stomachstatus_colorfade_current_z >= target_color_z + step)\r
+ stomachstatus_colorfade_current_z -= step;\r
+ else if(stomachstatus_colorfade_current_z <= target_color_z - step)\r
+ stomachstatus_colorfade_current_z += step;\r
\r
- return colortrans_current;\r
+ return stomachstatus_colorfade_current;\r
}\r
\r
void Sbar_Draw (void)\r
\r
Sbar_Reset();\r
\r
- Stomachstatus_Colortrans('0 0 0');\r
+ StomachStatus_ColorFade('0 0 0');\r
}\r
else\r
{\r
fade = 3.2 - 2 * (time - weapontime);\r
fade = bound(0.7, fade, 1);\r
\r
- if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) {\r
+ // draw the stomach board\r
+ if (cvar("viewsize") <= 100) {\r
if (teamplay)\r
drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color\r
else {\r
\r
drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
}\r
+ }\r
\r
- if(getstati(STAT_STOMACH_EATEN))\r
- {\r
- drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL);\r
- drawstring(bottomleft - '-80 172 0', "predator:", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- }\r
- else\r
- {\r
- drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL);\r
- drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- }\r
+ if(getstati(STAT_STOMACH_EATEN))\r
+ {\r
+ drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL);\r
+ drawstring(bottomleft - '-80 172 0', "predator:", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
+ else\r
+ {\r
+ drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL);\r
+ drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
+\r
float stomach_load;\r
stomach_load = getstati(STAT_STOMACH_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
\r
Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
Sbar_DrawXNum(bottomleft - '-50 170 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+\r
if(getstati(STAT_STOMACH_DIGESTING))\r
drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
else if(stomach_load == g_balance_vore_swallow_limit)\r
else\r
drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
- // draw the stomach board\r
+ // draw the stomach board player list\r
entity pl;\r
float f;\r
\r
continue;\r
\r
if(getstati(STAT_STOMACH_EATEN))\r
- {\r
f = pl.pleater == getstati(STAT_STOMACH_EATEN);\r
- }\r
else\r
{\r
if(spectatee_status)\r
\r
if(getstati(STAT_STOMACH_EATEN))\r
if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1)\r
- Sbar_PrintStomachboardItem2(bottomleft - '-76 156 0', pl);\r
+ Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl);\r
}\r
\r
- if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) {\r
+ if (cvar("viewsize") <= 100) {\r
if (teamplay)\r
drawpic(bottom - '96 96 0', "gfx/hud/bg_status", '192 96 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color\r
else {\r