From: Nick S Date: Thu, 11 May 2023 12:15:07 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/master' into morosophos/server-current4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9a775e745ace8b15ed84753814cfe6cbeb31dd57;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote-tracking branch 'origin/master' into morosophos/server-current4 --- 9a775e745ace8b15ed84753814cfe6cbeb31dd57 diff --cc qcsrc/client/hud/panel/scoreboard.qc index d22dc5f09,566f5a695..8b31584b5 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@@ -153,11 -160,8 +160,12 @@@ string Label_getInfo(string label, int case "returns": if (!mode) return CTX(_("SCO^returns")); else LOG_HELP(strcat("^3", "returns", " ^7", _("Number of flag returns"))); case "revivals": if (!mode) return CTX(_("SCO^revivals")); else LOG_HELP(strcat("^3", "revivals", " ^7", _("Number of revivals"))); case "rounds": if (!mode) return CTX(_("SCO^rounds won")); else LOG_HELP(strcat("^3", "rounds", " ^7", _("Number of rounds won"))); + case "rounds_pl": if (!mode) return CTX(_("SCO^rounds played"));else LOG_HELP(strcat("^3", "rounds_pl", " ^7", _("Number of rounds played"))); case "score": if (!mode) return CTX(_("SCO^score")); else LOG_HELP(strcat("^3", "score", " ^7", _("Total score"))); + case "avgspeed": if (!mode) return CTX(_("SCO^average speed"));else LOG_HELP(strcat("^3", "avgspeed", " ^7", _("Average speed (CTS)"))); + case "topspeed": if (!mode) return CTX(_("SCO^top speed")); else LOG_HELP(strcat("^3", "topspeed", " ^7", _("Top speed (CTS)"))); + case "startspeed": if (!mode) return CTX(_("SCO^start speed")); else LOG_HELP(strcat("^3", "startspeed", " ^7", _("Start speed (CTS)"))); + case "strafe": if (!mode) return CTX(_("SCO^strafe")); else LOG_HELP(strcat("^3", "strafe", " ^7", _("Strafe efficiency (CTS)"))); case "suicides": if (!mode) return CTX(_("SCO^suicides")); else LOG_HELP(strcat("^3", "suicides", " ^7", _("Number of suicides"))); case "sum": if (!mode) return CTX(_("SCO^sum")); else LOG_HELP(strcat("^3", "sum", " ^7", _("Number of kills minus deaths"))); case "takes": if (!mode) return CTX(_("SCO^takes")); else LOG_HELP(strcat("^3", "takes", " ^7", _("Number of domination points taken (Domination)"))); @@@ -1071,26 -1100,14 +1104,31 @@@ string Scoreboard_GetField(entity pl, P return ftos(fps); } + case SP_ROUNDS_PL: + return ftos(pl.(scores(field))); + case SP_DMG: case SP_DMGTAKEN: + if (rounds_played) + return sprintf("%.2f k", pl.(scores(field)) / (1000 * rounds_played)); return sprintf("%.1f k", pl.(scores(field)) / 1000); + case SP_CTS_STRAFE: + { + float strafe_efficiency = pl.(scores(field)) / 1000; + if(strafe_efficiency < -1) return ""; + sbt_field_rgb = '1 1 1' - (strafe_efficiency > 0 ? '1 0 1' : '0 1 1') * fabs(strafe_efficiency); + return sprintf("%.1f%%", strafe_efficiency * 100); + } + + case SP_CTS_STARTSPEED: + case SP_CTS_AVGSPEED: + case SP_CTS_TOPSPEED: + { + float speed = pl.(scores(field)) * GetSpeedUnitFactor(autocvar_hud_speed_unit); + if(speed < 0) return ""; + return sprintf("%d%s", speed, GetSpeedUnit(autocvar_hud_speed_unit)); + } + default: case SP_SCORE: tmp = pl.(scores(field)); f = scores_flags(field);