seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
- // MSG_INFO notifications (count = 347):
-// MSG_INFO notifications (count = 335):
++// MSG_INFO notifications (count = 348):
seta notification_INFO_CA_JOIN_LATE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_CA_LEAVE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_WEAPON_VAPORIZER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_WEAPON_VORTEX_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
- // MSG_CENTER notifications (count = 255):
-// MSG_CENTER notifications (count = 242):
++// MSG_CENTER notifications (count = 256):
seta notification_CENTER_ALONE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_ATTACKING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_ASSAULT_DEFENDING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_KEYHUNT_START "1" "0 = off, 1 = centerprint"
seta notification_CENTER_LMS_NOLIVES "1" "0 = off, 1 = centerprint"
seta notification_CENTER_LMS_SPECWARN "1" "0 = off, 1 = centerprint"
+ seta notification_CENTER_LMS_VISIBLE_LEADER "1" "0 = off, 1 = centerprint"
+ seta notification_CENTER_LMS_VISIBLE_OTHER "1" "0 = off, 1 = centerprint"
seta notification_CENTER_MISSING_PLAYERS "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MISSING_READY "1" "0 = off, 1 = centerprint"
seta notification_CENTER_MISSING_TEAMS "1" "0 = off, 1 = centerprint"
- seta notification_CENTER_MOTD "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MMM_CIVILIAN "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MMM_CIVILIAN_WIN "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MMM_CORPSEDETECTION "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MMM_DETECTIVE "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MMM_MURDERER "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_MMM_MURDERER_WIN "1" "0 = off, 1 = centerprint"
seta notification_CENTER_MOVETOSPEC_IDLING "1" "0 = off, 1 = centerprint"
seta notification_CENTER_NADE_BONUS "1" "0 = off, 1 = centerprint"
seta notification_CENTER_NADE_THROW "1" "0 = off, 1 = centerprint"
seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
- // Notification counts (total = 946): MSG_ANNCE = 141, MSG_INFO = 347, MSG_CENTER = 255, MSG_MULTI = 156, MSG_CHOICE = 28
-// Notification counts (total = 842): MSG_ANNCE = 80, MSG_INFO = 335, MSG_CENTER = 242, MSG_MULTI = 157, MSG_CHOICE = 28
++// Notification counts (total = 949): MSG_ANNCE = 141, MSG_INFO = 348, MSG_CENTER = 256, MSG_MULTI = 157, MSG_CHOICE = 28
}
}
- void centerprint_SetDuelTitle(string left, string right, string div)
+void centerprint_Medal(string icon, float times)
+{
+ if(!autocvar_hud_panel_centerprint_medals) return;
+
+ //LOG_INFOF("centerprint_Medal: icon: %s times: %d", icon, times);
+ //centerprint_medal_expire_time = time + autocvar_hud_panel_centerprint_time;
+ centerprint_medal_expire_time = time + MSG_MEDAL_TIME;
+ centerprint_medal_times = times;
+ if(centerprint_medal_icon)
+ strunzone(centerprint_medal_icon);
+ centerprint_medal_icon = strzone(strcat("gfx/medal/", icon));
+
+ centerprint_showing = true;
+}
+
+ void centerprint_SetDuelTitle(string left, string right)
{
- strcpy(centerprint_title_left, left);
- strcpy(centerprint_title_right, right);
- centerprint_SetTitle(sprintf("^BG%s^BG %s %s", left, div, right));
+ float namesize = autocvar_hud_panel_scoreboard_namesize * hud_fontsize.x;
+ strcpy(centerprint_title_left, textShortenToWidth(left, namesize, hud_fontsize, stringwidth_colors));
+ strcpy(centerprint_title_right, textShortenToWidth(right, namesize, hud_fontsize, stringwidth_colors));
}
void centerprint_SetTitle(string title)
if (autocvar_hud_panel_centerprint_flip)
pos.y += panel_size.y;
align = bound(0, autocvar_hud_panel_centerprint_align, 1);
+
+ // z411 draw medals first
+ if (autocvar_hud_panel_centerprint_medals && time < centerprint_medal_expire_time) {
+ float height = vid_conheight/50 * 4;
+ pos.y -= height;
+
+ if(time < centerprint_medal_expire_time - MSG_MEDAL_FADE_TIME)
+ a = 1;
+ else
+ a = (centerprint_medal_expire_time - time) / MSG_MEDAL_FADE_TIME;
+
+ vector tmp_in = pos;
+
+ vector mysize = draw_getimagesize(centerprint_medal_icon);
+ vector newsize = vec2(height*(mysize.x/mysize.y), height);
+ vector fontsize = '1 1 0' * (newsize.y/2);
+
+ tmp_in.x += (panel_size.x - newsize.x) / 2; // center medal icon
+
+ if(centerprint_medal_times < autocvar_hud_panel_centerprint_medals_max) {
+ tmp_in.x -= ((newsize.x * 1.1) * (centerprint_medal_times - 1) / 2);
+ for(int t = 0; t < centerprint_medal_times; t++) {
+ drawpic(tmp_in, centerprint_medal_icon, newsize, '1 1 1', a, DRAWFLAG_NORMAL);
+ tmp_in.x += newsize.x * 1.1;
+ }
+ } else {
+ drawpic(tmp_in, centerprint_medal_icon, newsize, '1 1 1', a, DRAWFLAG_NORMAL);
+ tmp_in.x += newsize.x + fontsize.x * 0.25; // draw times next to it
+ tmp_in.y += (newsize.y - fontsize.y) / 2;
+ drawstring(tmp_in, ftos(centerprint_medal_times), fontsize, '1 1 1', a, DRAWFLAG_NORMAL);
+ }
+
+ pos.y += height;
+
+ all_messages_expired = false;
+ }
// Show title if available
- if(centerprint_title) {
+ if(centerprint_title != "" || centerprint_title_left != "") {
vector fontsize = cp_fontsize * autocvar_hud_panel_centerprint_fontscale_title;
- float width = stringwidth(centerprint_title, true, fontsize);
-
- pos.x = panel_pos.x + (panel_size.x - width) * align;
+ float width = 0, right_width = 0, left_width = 0, max_rl_width = 0;
+ if (centerprint_title != "")
+ width = stringwidth(centerprint_title, true, fontsize);
+ else
+ {
+ right_width = stringwidth(centerprint_title_right, true, fontsize);
+ left_width = stringwidth(centerprint_title_left, true, fontsize);
+ }
if (autocvar_hud_panel_centerprint_flip)
pos.y -= fontsize.y;
bool autocvar_hud_panel_scoreboard_playerid = false;
string autocvar_hud_panel_scoreboard_playerid_prefix = "#";
string autocvar_hud_panel_scoreboard_playerid_suffix = " ";
+int average_ping[NUM_TEAMS];
+int total_weapons;
+ float scoreboard_time;
+
// mode 0: returns translated label
// mode 1: prints name and description of all the labels
string Label_getInfo(string label, int mode)
}
}
+ if(flag_name != "") {
+ drawpic(pos, flag_name, flag_size, sbt_field_icon1_rgb, sbt_fg_alpha, DRAWFLAG_NORMAL);
+ pos.x += flag_size.x + hud_fontsize.x * 0.5;
+ }
+
+ if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD && scoreboard_ui_enabled == 1)
+ {
+ if (pl == scoreboard_selected_player)
+ {
+ h_size.x = column_width + hud_fontsize.x * 0.25;
+ h_size.y = hud_fontsize.y;
+ drawfill(pos - hud_fontsize.x * 0.25 * eX, h_size, rgb, 0.44 * panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+ }
+
vector name_pos = pos;
if((this_team == NUM_SPECTATOR) && autocvar_hud_panel_scoreboard_spectators_aligned)
name_pos.x += max(fieldsize, min_fieldsize) + 2 * fieldpadding + hud_fontsize.x * 0.25;
pos.y += 1.25 * hud_fontsize.y;
++i;
}
+ if(with_ping) average_ping[Team_TeamToIndex(tm.team) - 1] /= with_ping;
+ if (scoreboard_selected_panel == SB_PANEL_SCOREBOARD)
+ {
+ if (scoreboard_ui_enabled == 1 || (tm && scoreboard_selected_team == tm))
+ {
+ float _alpha = (scoreboard_ui_enabled == 2) ? 0.2 : 0.3 * max(0, (1 - (time - scoreboard_selected_panel_time) * 2));
+ _alpha *= panel_fg_alpha;
+ if (_alpha)
+ drawfill(scoreboard_selected_hl_pos, scoreboard_selected_hl_size, '1 1 1', _alpha, DRAWFLAG_NORMAL);
+ }
+ }
+
panel_size.x += panel_bg_padding * 2; // restore initial width
return end_pos;
}
panel_size.x += panel_bg_padding * 2; // restore initial width
return end_pos;
}
+*/
- int rankings_rows = 0;
- int rankings_columns = 0;
- int rankings_cnt = 0;
vector Scoreboard_Rankings_Draw(vector pos, string ranktitle, entity pl, vector rgb, vector bg_size)
{
int i;
sb_gameinfo_type_fontsize = hud_fontsize * 2.5;
sb_gameinfo_detail_fontsize = hud_fontsize * 1.3;
+ // z411 server name
+ //drawcolorcodedstring(pos, "bienvenidoainternet.org", sb_gameinfo_type_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+ //drawpic_aspect(pos + '1 0 0' * (panel_size.x - 150), "gfx/bai_logo", vec2(150, sb_gameinfo_type_fontsize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ //pos.y += sb_gameinfo_type_fontsize.y;
+
// Game Info: Game Type
- str = MapInfo_Type_ToText(gametype);
-
+ if (scoreboard_ui_enabled == 2)
+ str = _("Team Selection");
+ else
+ str = MapInfo_Type_ToText(gametype);
draw_beginBoldFont();
- drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_type_fontsize)), str, sb_gameinfo_type_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+ //drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_type_fontsize)), str, sb_gameinfo_type_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawcolorcodedstring(pos, str, sb_gameinfo_type_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
draw_endBoldFont();
-
+
+ vector tmp_old_sz = draw_getimagesize("gfx/bai_logo");
+ float tmp_aspect = tmp_old_sz.x/tmp_old_sz.y;
+ vector tmp_new_sz = vec2(sb_gameinfo_type_fontsize.y * tmp_aspect, sb_gameinfo_type_fontsize.y);
+
++ // z411 Server logo
+ drawpic(pos + '1 0 0' * (panel_size.x - tmp_new_sz.x), "gfx/bai_logo", tmp_new_sz, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+
pos.y += sb_gameinfo_type_fontsize.y;
+
+ // z411 servername
+ drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth_colors(hostname_full, sb_gameinfo_detail_fontsize)), hostname_full, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+
+ pos.y += sb_gameinfo_detail_fontsize.y;
+
// Game Info: Game Detail
- float tl = STAT(TIMELIMIT);
- float fl = STAT(FRAGLIMIT);
- float ll = STAT(LEADLIMIT);
- float ll_and_fl = STAT(LEADLIMIT_AND_FRAGLIMIT);
- str = "";
- if(tl > 0)
- str = strcat(str, sprintf(_("^3%1.0f minutes"), tl));
- if(!gametype.m_hidelimits)
- {
- if(fl > 0)
- {
- if(tl > 0)
- str = strcat(str, "^7 / "); // delimiter
- if(teamplay)
- {
- str = strcat(str, sprintf(_("^5%s %s"), ScoreString(teamscores_flags(ts_primary), fl),
- (teamscores_label(ts_primary) == "score") ? CTX(_("SCO^points")) :
- (teamscores_label(ts_primary) == "fastest") ? "" :
- TranslateScoresLabel(teamscores_label(ts_primary))));
- }
- else
- {
- str = strcat(str, sprintf(_("^5%s %s"), ScoreString(scores_flags(ps_primary), fl),
- (scores_label(ps_primary) == "score") ? CTX(_("SCO^points")) :
- (scores_label(ps_primary) == "fastest") ? "" :
- TranslateScoresLabel(scores_label(ps_primary))));
- }
- }
- if(ll > 0)
+ if (scoreboard_ui_enabled == 2)
+ {
+ if (scoreboard_selected_team)
+ str = sprintf(_("^7Press ^3%s^7 to join the selected team"), getcommandkey(_("jump"), "+jump"));
+ else
+ str = sprintf(_("^7Press ^3%s^7 to auto-select a team and join"), getcommandkey(_("jump"), "+jump"));
+ drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+
+ pos.y += sb_gameinfo_detail_fontsize.y + hud_fontsize.y * 0.3;
+ str = sprintf(_("^7Press ^3%s ^7to select a specific team"), translate_key("TAB"));
+ drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+ else
+ {
+ float tl = STAT(TIMELIMIT);
+ float fl = STAT(FRAGLIMIT);
+ float ll = STAT(LEADLIMIT);
+ float ll_and_fl = STAT(LEADLIMIT_AND_FRAGLIMIT);
+ str = "";
+ if(tl > 0)
+ str = strcat(str, sprintf(_("^3%1.0f minutes"), tl));
+ if(!gametype.m_hidelimits)
{
- if(tl > 0 || fl > 0)
+ if(fl > 0)
{
- // delimiter
- if (ll_and_fl && fl > 0)
- str = strcat(str, "^7 & ");
+ if(tl > 0)
+ str = strcat(str, "^7 / "); // delimiter
+ if(teamplay)
+ {
+ str = strcat(str, sprintf(_("^5%s %s"), ScoreString(teamscores_flags(ts_primary), fl),
+ (teamscores_label(ts_primary) == "score") ? CTX(_("SCO^points")) :
+ (teamscores_label(ts_primary) == "fastest") ? "" :
+ TranslateScoresLabel(teamscores_label(ts_primary))));
+ }
else
- str = strcat(str, "^7 / ");
- }
-
- if(teamplay)
- {
- str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(teamscores_flags(ts_primary), ll),
- (teamscores_label(ts_primary) == "score") ? CTX(_("SCO^points")) :
- (teamscores_label(ts_primary) == "fastest") ? "" :
- TranslateScoresLabel(teamscores_label(ts_primary))));
+ {
+ str = strcat(str, sprintf(_("^5%s %s"), ScoreString(scores_flags(ps_primary), fl),
+ (scores_label(ps_primary) == "score") ? CTX(_("SCO^points")) :
+ (scores_label(ps_primary) == "fastest") ? "" :
+ TranslateScoresLabel(scores_label(ps_primary))));
+ }
}
- else
+ if(ll > 0)
{
- str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(scores_flags(ps_primary), ll),
- (scores_label(ps_primary) == "score") ? CTX(_("SCO^points")) :
- (scores_label(ps_primary) == "fastest") ? "" :
- TranslateScoresLabel(scores_label(ps_primary))));
+ if(tl > 0 || fl > 0)
+ {
+ // delimiter
+ if (ll_and_fl && fl > 0)
+ str = strcat(str, "^7 & ");
+ else
+ str = strcat(str, "^7 / ");
+ }
+
+ if(teamplay)
+ {
+ str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(teamscores_flags(ts_primary), ll),
+ (teamscores_label(ts_primary) == "score") ? CTX(_("SCO^points")) :
+ (teamscores_label(ts_primary) == "fastest") ? "" :
+ TranslateScoresLabel(teamscores_label(ts_primary))));
+ }
+ else
+ {
+ str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(scores_flags(ps_primary), ll),
+ (scores_label(ps_primary) == "score") ? CTX(_("SCO^points")) :
+ (scores_label(ps_primary) == "fastest") ? "" :
+ TranslateScoresLabel(scores_label(ps_primary))));
+ }
}
}
- }
+
- drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right
- // map name
- str = sprintf(_("^7Map: ^2%s"), shortmapname);
- drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left
+ drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right
+ // map name
+ str = sprintf(_("^7Map: ^2%s"), shortmapname);
+ drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left
+ }
// End of Game Info Section
pos.y += sb_gameinfo_detail_fontsize.y + hud_fontsize.y * 0.3; // space between Game Info Section and score table