]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into morosophos/server-current4
authorNick S <nick@teichisma.info>
Thu, 11 May 2023 12:15:07 +0000 (15:15 +0300)
committerNick S <nick@teichisma.info>
Thu, 11 May 2023 12:15:07 +0000 (15:15 +0300)
1  2 
_hud_common.cfg
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/common/command/generic.qc
qcsrc/common/scores.qh
qcsrc/common/util.qc

diff --cc _hud_common.cfg
Simple merge
index d22dc5f0994933da77e86643f97b5f4fdbc5b014,566f5a695635fe93419460c58ba81ec955162345..8b31584b51fe1546ff8ffbdf4a2b7eb51d005851
@@@ -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);
Simple merge
Simple merge
Simple merge