X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fscoreboard.qc;h=06e29680f2d3a9499241ffb8c96d27bd7e8ed2e3;hp=b037d03d20cb35a4431315f87bc6ade863153b8b;hb=d6e1aa437e7eb8e182053cf17231597e79df0f81;hpb=9531e6a07b13cbccf27113f1dcb6e5ccacc6fbb4 diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index b037d03d2..06e29680f 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -54,20 +54,6 @@ string TranslateScoresLabel(string l) } } -void MapVote_Draw(); -void HUD_FinaleOverlay() -{ - /*vector pos; - pos_x = (vid_conwidth - 1)/2; - pos_y = 16; - pos_z = 0;*/ - - //drawpic(pos, "gfx/finale", '0 0 0', '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL); - - //drawstring(pos, "END", hud_fontsize, '1 1 1', 1, DRAWFLAG_NORMAL); - MapVote_Draw(); -} - void Cmd_HUD_SetFields(float argc); void HUD_InitScores() { @@ -390,7 +376,7 @@ void Cmd_HUD_SetFields(float argc) hud_field[hud_num_fields] = SP_PL; } else if(str == "kd" || str == "kdr" || str == "kdratio" || str == "k/d") { hud_field[hud_num_fields] = SP_KDRATIO; - } else if(str == "sum" || str == "diff" || str == "f-d") { + } else if(str == "sum" || str == "diff" || str == "k-d") { hud_field[hud_num_fields] = SP_SUM; } else if(str == "name" || str == "nick") { hud_field[hud_num_fields] = SP_NAME; @@ -410,7 +396,7 @@ void Cmd_HUD_SetFields(float argc) else { if (!nocomplain) - print(sprintf("^1Error:^7 Unknown score field: '%s'\n", str)); + printf("^1Error:^7 Unknown score field: '%s'\n", str); continue; } :found @@ -481,7 +467,7 @@ void Cmd_HUD_SetFields(float argc) hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize); hud_field[hud_num_fields] = ps_secondary; ++hud_num_fields; - print(sprintf("fixed missing field '%s'\n", scores_label[ps_secondary])); + printf("fixed missing field '%s'\n", scores_label[ps_secondary]); } if(!have_primary) { @@ -490,7 +476,7 @@ void Cmd_HUD_SetFields(float argc) hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], FALSE, hud_fontsize); hud_field[hud_num_fields] = ps_primary; ++hud_num_fields; - print(sprintf("fixed missing field '%s'\n", scores_label[ps_primary])); + printf("fixed missing field '%s'\n", scores_label[ps_primary]); } } @@ -969,7 +955,7 @@ float average_accuracy; vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) { float i; - float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba + float weapon_cnt = WEP_COUNT - 3; // either vaporizer/nex are hidden, no port-o-launch, no tuba float rows; if(autocvar_scoreboard_accuracy_doublerows) rows = 2; @@ -1012,7 +998,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) if(rows == 2) pos_x += weapon_width / 2; - if(switchweapon == WEP_MINSTANEX) + if(switchweapon == WEP_VAPORIZER) g_minstagib = 1; // TODO: real detection for minstagib? float weapon_stats; @@ -1026,7 +1012,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) self = get_weaponinfo(i); if (!self.weapon) continue; - if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba + if ((i == WEP_VORTEX && g_minstagib) || i == WEP_PORTO || (i == WEP_VAPORIZER && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, vortex || vaporizer and tuba continue; weapon_stats = weapon_accuracy[i-WEP_FIRST]; @@ -1037,7 +1023,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) weapon_alpha = 0.2 * scoreboard_alpha_fg; // weapon icon - drawpic_aspect_skin(pos, strcat("weapon", self.netname), '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos, self.model2, '1 0 0' * weapon_width + '0 1 0' * weapon_height, '1 1 1', weapon_alpha, DRAWFLAG_NORMAL); // the accuracy if(weapon_stats >= 0) { weapons_with_stats += 1; @@ -1087,15 +1073,23 @@ vector HUD_DrawKeyValue(vector pos, string key, string value) { vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) { float stat_secrets_found, stat_secrets_total; - float rows; + float stat_monsters_killed, stat_monsters_total; + float rows = 0; string val; + + // get monster stats + stat_monsters_killed = getstatf(STAT_MONSTERS_KILLED); + stat_monsters_total = getstatf(STAT_MONSTERS_TOTAL); // get secrets stats stat_secrets_found = getstatf(STAT_SECRETS_FOUND); stat_secrets_total = getstatf(STAT_SECRETS_TOTAL); // get number of rows - rows = (stat_secrets_total ? 1 : 0); + if(stat_secrets_total) + rows += 1; + if(stat_monsters_total) + rows += 1; // if no rows, return if (!rows) @@ -1116,9 +1110,19 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) { drawpic_tiled(pos, "gfx/scoreboard/scoreboard_bg", bg_size, tmp, rgb, scoreboard_alpha_bg, DRAWFLAG_NORMAL); drawborderlines(autocvar_scoreboard_border_thickness, pos, tmp, '0 0 0', scoreboard_alpha_bg * 0.75, DRAWFLAG_NORMAL); + // draw monsters + if(stat_monsters_total) + { + val = sprintf("%d/%d", stat_monsters_killed, stat_monsters_total); + pos = HUD_DrawKeyValue(pos, _("Monsters killed:"), val); + } + // draw secrets - val = sprintf("%d/%d", stat_secrets_found, stat_secrets_total); - pos = HUD_DrawKeyValue(pos, _("Secrets found:"), val); + if(stat_secrets_total) + { + val = sprintf("%d/%d", stat_secrets_found, stat_secrets_total); + pos = HUD_DrawKeyValue(pos, _("Secrets found:"), val); + } // update position pos_y += 1.25 * hud_fontsize_y; @@ -1309,7 +1313,7 @@ void HUD_DrawScoreboard() } pos = HUD_DrawScoreboardRankings(pos, playerslots[player_localnum], rgb, bg_size); } - else if(autocvar_scoreboard_accuracy && spectatee_status != -1 && !warmup_stage) { + else if(autocvar_scoreboard_accuracy && spectatee_status == 0 && !warmup_stage && gametype != MAPINFO_TYPE_NEXBALL) { if(teamplay) pos = HUD_DrawScoreboardAccuracyStats(pos, Team_ColorRGB(myteam), bg_size); else @@ -1345,7 +1349,7 @@ void HUD_DrawScoreboard() // Print info string float tl, fl, ll; - str = sprintf(_("playing on ^2%s^7"), shortmapname); + str = sprintf(_("playing ^3%s^7 on ^2%s^7"), MapInfo_Type_ToText(gametype), shortmapname); tl = getstatf(STAT_TIMELIMIT); fl = getstatf(STAT_FRAGLIMIT); ll = getstatf(STAT_LEADLIMIT); @@ -1403,6 +1407,7 @@ void HUD_DrawScoreboard() // print information about respawn status float respawn_time = getstatf(STAT_RESPAWN_TIME); + if(!intermission) if(respawn_time) { if(respawn_time < 0)