Sbar_UpdatePlayerTeams();\r
if (intermission == 2) // map voting screen\r
{\r
- if(spectatee_status != -1) {\r
- Sbar_Score();\r
- Sbar_Timer();\r
- }\r
- else if(sb_showscores) {\r
- Sbar_DrawScoreboard();\r
- Sbar_Score();\r
- Sbar_Timer();\r
- }\r
+ Sbar_Timer();\r
+ if(sb_showscores)\r
+ Sbar_DrawScoreboard();\r
else\r
Sbar_FinaleOverlay();\r
\r
else\r
Sbar_DrawScoreboard();\r
float armor, health;\r
- armor = getstati(STAT_ARMOR); // armor is not used in Vore Tournament by default, but still exists for mods that might want it\r
+ armor = getstati(STAT_ARMOR);\r
health = getstati(STAT_HEALTH);\r
\r
stat_items = getstati(STAT_ITEMS);\r
fade = 3.2 - 2 * (time - weapontime);\r
fade = bound(0.7, fade, 1);\r
\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
- // allow for custom HUD colors in non-teamgames\r
- color_x = cvar("sbar_color_bg_r");\r
- color_y = cvar("sbar_color_bg_g");\r
- color_z = cvar("sbar_color_bg_b");\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_VORE_EATEN))\r
+ if(g_vore) // only when the vore system is active\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") * sbar_alpha_fg, 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") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- }\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
+ // allow for custom HUD colors in non-teamgames\r
+ color_x = cvar("sbar_color_bg_r");\r
+ color_y = cvar("sbar_color_bg_g");\r
+ color_z = cvar("sbar_color_bg_b");\r
+\r
+ drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+ }\r
+ }\r
\r
- float stomach_load;\r
- stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
+ if(getstati(STAT_VORE_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") * sbar_alpha_fg, 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") * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\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
+ float stomach_load;\r
+ stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
\r
- if(getstati(STAT_VORE_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
- drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- else if(!stomach_load)\r
- drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\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
+ 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
- // draw the stomach board player list\r
- entity pl;\r
- float f;\r
+ if(getstati(STAT_VORE_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
+ drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ else if(!stomach_load)\r
+ drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\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
- pos = bottomleft;\r
- for(pl = players.sort_next; pl; pl = pl.sort_next)\r
- {\r
- if(pl.team == COLOR_SPECTATOR)\r
- continue;\r
+ // draw the stomach board player list\r
+ entity pl;\r
+ float f;\r
\r
- if(getstati(STAT_VORE_EATEN))\r
- f = pl.plpredator == getstati(STAT_VORE_EATEN);\r
- else\r
+ pos = bottomleft;\r
+ for(pl = players.sort_next; pl; pl = pl.sort_next)\r
{\r
- if(spectatee_status)\r
- f = pl.plpredator == spectatee_status;\r
+ if(pl.team == COLOR_SPECTATOR)\r
+ continue;\r
+\r
+ if(getstati(STAT_VORE_EATEN))\r
+ f = pl.plpredator == getstati(STAT_VORE_EATEN);\r
else\r
- f = pl.plpredator == player_localentnum;\r
- }\r
+ {\r
+ if(spectatee_status)\r
+ f = pl.plpredator == spectatee_status;\r
+ else\r
+ f = pl.plpredator == player_localentnum;\r
+ }\r
\r
- if(f)\r
- {\r
- Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
- pos_y += 1.25 * sbar_fontsize_y;\r
- }\r
+ if(f)\r
+ {\r
+ Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
+ pos_y += 1.25 * sbar_fontsize_y;\r
+ }\r
\r
- if(getstati(STAT_VORE_EATEN))\r
- if(pl.sv_entnum == getstati(STAT_VORE_EATEN) - 1)\r
- Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl);\r
+ if(getstati(STAT_VORE_EATEN))\r
+ if(pl.sv_entnum == getstati(STAT_VORE_EATEN) - 1)\r
+ Sbar_PrintStomachboardItemPred(bottomleft - '-76 156 0', pl);\r
+ }\r
}\r
\r
if (cvar("viewsize") <= 100) {\r
}\r
}\r
\r
- vector health_pos;\r
+ vector health_pos, armor_pos;\r
health_pos = bottom - '77 58 0';\r
+ armor_pos = bottom - '62 68 0';\r
+\r
+ // armor\r
+ x = armor;\r
+ if (x > 0)\r
+ {\r
+ drawpic(armor_pos + '10.5 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ if(x < 100) armor_pos_x -= 4.5; // always center\r
+ if(x < 10) armor_pos_x -= 7; // always center\r
+ Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg);\r
+ }\r
\r
// health\r
x = health;\r
pos_x = bottom_x + 140;\r
pos_y = bottom_y - 20;\r
\r
+ float weapon_clipload, weapon_clipsize;\r
+\r
// if we are using the jetpack, show fuel ammo. Otherwise show the ammo of our weapon\r
if(stat_items & IT_JETPACK && button_jetpack)\r
{\r
{\r
a = getstati(GetAmmoStat(i)); // how much ammo do we have of type i?\r
drawpic(pos - '98 18 0', GetAmmoPicture(i), '20 20 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
+\r
+ // if the weapon we're holding is reloadable, show both its ammo and load\r
+ if(weapon_clipsize)\r
+ {\r
+ weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
+ if(weapon_clipload < 0) // we're reloading\r
+ drawstring(pos - '124 23 0', "- -", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ else\r
+ Sbar_DrawXNum(pos - '132 23 0', weapon_clipload, 2, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(pos - '137 7 0', a, 3, 0, 12, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
+ else\r
+ Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
}\r