pos_y += 1.2 * sbar_fontsize_y;\r
drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, sbar_fontsize)), str, sbar_fontsize, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
\r
+ // print information about respawn status\r
+ float respawn_time = getstatf(STAT_RESPAWN_TIME);\r
+ dprint(strcat(ftos(respawn_time), " --------\n"));\r
+ if(respawn_time)\r
+ {\r
+ if(respawn_time < 0)\r
+ {\r
+ // a negative number means we are awaiting respawn, time value is still the same\r
+ respawn_time *= -1; // remove mark now that we checked it\r
+ if(time >= respawn_time) // don't show a negative value while the server is respawning the player (lag)\r
+ str = strcat("^1Respawning...");\r
+ else\r
+ str = strcat("^1Respawning in ^3", ftos_decimals(respawn_time - time, 2), "^1 seconds...");\r
+ }\r
+ else if(time < respawn_time)\r
+ str = strcat("You are dead, wait ^3", ftos_decimals(respawn_time - time, 2), "^7 seconds before respawning");\r
+ else if(time >= respawn_time)\r
+ str = strcat("You are dead, press ^2", getcommandkey("primary fire", "+fire"), "^7 to respawn");\r
+\r
+ pos_y += 1.2 * sbar_fontsize_y;\r
+ drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, sbar_fontsize)), str, sbar_fontsize, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
+\r
scoreboard_bottom = pos_y + 2 * sbar_fontsize_y;\r
}\r
\r
health_pos = bottom - '43 58 0';\r
armor_pos = bottom - '43 68 0';\r
\r
- if (cvar("viewsize") <= 100) {\r
+ if (cvar("viewsize") <= 100 && sbar_hudselector) {\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
health_pos -= '1 0 0' * stringwidth(ftos(x), FALSE, '22 22 0') * 0.5;\r
Sbar_DrawXNum(health_pos, x, 3, 0, 22, Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
+ // if we are dead, we can skip the HUD from here\r
+ if(health <= 0)\r
+ return;\r
+\r
// ammo\r
pos_x = bottom_x + 140;\r
pos_y = bottom_y - 20;\r
bgpos_z = 0;\r
}\r
\r
- if (cvar("viewsize") <= 100) { // draw timer background when viewsize <= 100\r
+ if (cvar("viewsize") <= 100 && sbar_hudselector) { // draw timer background when viewsize <= 100\r
if (teamplay)\r
drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color\r
else {\r
Sbar_DrawScoreboard();\r
Sbar_Score();\r
Sbar_Timer();\r
+ Sbar_Portrait();\r
if(getstati(STAT_VORE_EATEN))\r
Sbar_Status();\r
\r
drawpic(warn_pos - '128 0 0', "gfx/hud/sb_power_fail", '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawpic(warn_pos - '16 0 0' + '0 150 0', "gfx/hud/sb_power_fail_icon", '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
power_boot = time + g_power_reboot;\r
+ Sbar_Portrait(); // draw the portrait still\r
return; // skip drawing the HUD\r
}\r
else if(time <= power_boot)\r
// subsystems are rebooting\r
drawpic(warn_pos - '128 0 0', "gfx/hud/sb_power_reboot", '256 256 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
drawpic(warn_pos - '16 0 0' + '0 150 0', "gfx/hud/sb_power_reboot_icon", '32 32 0', '1 1 1', sbar_alpha_fg * (0.5 + sin(time * 5) / 2), DRAWFLAG_NORMAL);\r
+ Sbar_Portrait(); // draw the portrait still\r
return; // skip drawing the HUD\r
}\r
}\r
if(g_vore) // only when the vore system is active\r
{\r
// draw the stomach board\r
- if (cvar("viewsize") <= 100) {\r
+ if (cvar("viewsize") <= 100 && sbar_hudselector) {\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
status_pos = bottomleft - '-43 168 0';\r
status_size = 16;\r
}\r
- else if(g_healthsize_center >= 0) // no point in showing it otherwise\r
+ else\r
{\r
status_text = strcat(status_color, ftos(stomach_maxload));\r
status_pos = bottomleft - '-43 170 0';\r
float f, l;\r
\r
pos = bottomleft;\r
+ hud_total_prey = 0;\r
for(pl = players.sort_next; pl; pl = pl.sort_next)\r
{\r
if(pl.team == COLOR_SPECTATOR)\r
f = pl.plpredator == player_localentnum;\r
}\r
\r
- if(f && l <= 8) // limit the stomach board to 9 entries due to the HUD design\r
+ if(f)\r
{\r
- Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
- pos_y += 1.1 * sbar_fontsize_y;\r
- l += 1;\r
+ if(l <= 8) // limit the stomach board to 9 entries due to the HUD design\r
+ {\r
+ Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
+ pos_y += 1.1 * sbar_fontsize_y;\r
+ l += 1;\r
+ }\r
+ ++hud_total_prey;\r
}\r
\r
// set the predator's name\r