Merge branch 'martin-t/warns' into 'master'
authorMario <zacjardine@y7mail.com>
Wed, 23 Jan 2019 08:57:25 +0000 (08:57 +0000)
committerMario <zacjardine@y7mail.com>
Wed, 23 Jan 2019 08:57:25 +0000 (08:57 +0000)
Only show warnings for current map in GAMEQC

See merge request xonotic/xonotic-data.pk3dir!628

18 files changed:
.tx/merge-base
common.pt_BR.po
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
languages.txt
notifications.cfg
qcsrc/client/hud/panel/modicons.qc
qcsrc/client/hud/panel/pressedkeys.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/notifications/all.inc
qcsrc/server/client.qc
qcsrc/server/command/getreplies.qc
qcsrc/server/teamplay.qc

index e21e879..6db991b 100644 (file)
@@ -1 +1 @@
-Sat Jan 12 07:24:11 CET 2019
+Tue Jan 15 07:24:12 CET 2019
index 7d293d9..b9f8dcf 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Translators:
 # Ivan Paulos Tomé <greylica@gmail.com>, 2016
-# Jean Trindade Pereira <jean_trindade2@hotmail.com>, 2018
+# Jean Trindade Pereira <jean_trindade2@hotmail.com>, 2018-2019
 # Mirio <opivy@hotmail.de>, 2017
 # NotThatPrivate Yes <henriqueferreira2009@gmail.com>, 2015
 # Ricardo Manuel da Cruz Coelho da Silva <ricardo.mccs@gmail.com>, 2015
@@ -14,7 +14,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2018-12-13 15:42+0100\n"
-"PO-Revision-Date: 2018-12-19 09:40+0000\n"
+"PO-Revision-Date: 2019-01-15 02:59+0000\n"
 "Last-Translator: Jean Trindade Pereira <jean_trindade2@hotmail.com>\n"
 "Language-Team: Portuguese (Brazil) (http://www.transifex.com/team-xonotic/"
 "xonotic/language/pt_BR/)\n"
@@ -1837,7 +1837,7 @@ msgstr "Granada de armadilha"
 
 #: qcsrc/common/mutators/mutator/nades/nades.inc:74
 msgid "Veil grenade"
-msgstr ""
+msgstr "Granada de véu"
 
 #: qcsrc/common/mutators/mutator/nades/nades.qh:34
 msgid "Grenade"
@@ -3250,11 +3250,13 @@ msgstr ""
 msgid ""
 "^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Overkill Machine Gun%s%s"
 msgstr ""
+"^BG%s%s^K1 ficou cheio de buracos por causa da Metralhadora Suprema de ^BG"
+"%s^K1%s%s"
 
 #: qcsrc/common/notifications/all.inc:494
 #, c-format
 msgid "^BG%s%s^K1 has been vaporized by ^BG%s^K1's Overkill Nex%s%s"
-msgstr ""
+msgstr "^BG%s%s^K1 foi vaporizado pela Vortex Suprema de ^BG%s^K1%s%s"
 
 #: qcsrc/common/notifications/all.inc:495
 #, c-format
@@ -3262,29 +3264,31 @@ msgid ""
 "^BG%s%s^K1 was sawn in half by ^BG%s^K1's Overkill Rocket Propelled Chainsaw"
 "%s%s"
 msgstr ""
+"^BG%s%s^K1 foi serrado ao meio pelo Lança-motosserras Supremo de ^BG%s^K1%s%s"
 
 #: qcsrc/common/notifications/all.inc:496
 #, c-format
 msgid ""
 "^BG%s%s^K1 almost dodged ^BG%s^K1's Overkill Rocket Propelled Chainsaw%s%s"
-msgstr ""
+msgstr "^BG%s%s^K1 quase desviou do Lança-motosserras Supremo de ^BG%s^K1%s%s"
 
 #: qcsrc/common/notifications/all.inc:497
 #, c-format
 msgid ""
 "^BG%s^K1 was sawn in half by their own Overkill Rocket Propelled Chainsaw%s%s"
 msgstr ""
+"^BG%s^K1 foi serrado ao meio pelo seu próprio Lança-motosserras Supremo%s%s"
 
 #: qcsrc/common/notifications/all.inc:498
 #, c-format
 msgid ""
 "^BG%s^K1 blew themself up with their Overkill Rocket Propelled Chainsaw%s%s"
-msgstr ""
+msgstr "^BG%s^K1 se explodiu com seu próprio Lança-motosserras Supremo%s%s"
 
 #: qcsrc/common/notifications/all.inc:500
 #, c-format
 msgid "^BG%s%s^K1 was gunned down by ^BG%s^K1's Overkill Shotgun%s%s"
-msgstr ""
+msgstr "^BG%s%s^K1 foi baleado pela Escopeta Suprema de ^BG%s^K1%s%s"
 
 #: qcsrc/common/notifications/all.inc:501
 #, c-format
@@ -3334,12 +3338,12 @@ msgstr "^BG%s%s^K1 deu uns tapas em ^BG%s^K1 com uma grande Shockwave%s%s"
 #: qcsrc/common/notifications/all.inc:510
 #, c-format
 msgid "^BG%s%s^K1 was gunned down by ^BG%s^K1's Shotgun%s%s"
-msgstr "^BG%s%s^K1 foi baleado pela Shotgun de ^BG%s^K1%s%s"
+msgstr "^BG%s%s^K1 foi baleado pela Escopeta de ^BG%s^K1%s%s"
 
 #: qcsrc/common/notifications/all.inc:511
 #, c-format
 msgid "^BG%s%s^K1 slapped ^BG%s^K1 around a bit with a large Shotgun%s%s"
-msgstr "^BG%s%s^K1 deu uns tapas em ^BG%s^K1 com uma grande Shotgun%s%s"
+msgstr "^BG%s%s^K1 deu uns tapas em ^BG%s^K1 com uma grande Escopeta%s%s"
 
 #: qcsrc/common/notifications/all.inc:512
 #, c-format
@@ -4786,7 +4790,7 @@ msgstr "Shockwave"
 
 #: qcsrc/common/weapons/weapon/shotgun.qh:18
 msgid "Shotgun"
-msgstr "Shotgun"
+msgstr "Escopeta"
 
 #: qcsrc/common/weapons/weapon/tuba.qh:18
 #, no-c-format
@@ -8561,7 +8565,7 @@ msgstr "Exibir data e hora atual"
 
 #: qcsrc/menu/xonotic/dialog_settings_misc.qc:144
 msgid "Show current date and time of day, useful on screenshots"
-msgstr "Exibe a data e hora atual do dia, útil para capturas de tela"
+msgstr "Exibe a data e hora atual, útil para capturas de tela"
 
 #: qcsrc/menu/xonotic/dialog_settings_misc.qc:147
 msgid "Enable developer mode"
index 9dcfe06..813ecba 100644 (file)
@@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding "1"
-seta hud_panel_pressedkeys_aspect "1.6"
+seta hud_panel_pressedkeys_aspect "1.8"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat_pos "0.010000 0.700000"
index 3f4fe39..c5cfe4a 100644 (file)
@@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.6"
+seta hud_panel_pressedkeys_aspect "1.8"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat_pos "0.010000 0.700000"
index 609ab76..b728258 100644 (file)
@@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.6"
+seta hud_panel_pressedkeys_aspect "1.8"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat_pos "0 0.775000"
index b7a7d20..3bfd694 100644 (file)
@@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.6"
+seta hud_panel_pressedkeys_aspect "1.8"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat_pos "0 0.775000"
index ce81868..c808f62 100644 (file)
@@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.6"
+seta hud_panel_pressedkeys_aspect "1.8"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat_pos "0.020000 0.780000"
index 4159b01..b0b02d0 100644 (file)
@@ -207,7 +207,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.6"
+seta hud_panel_pressedkeys_aspect "1.8"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat_pos "0 0.760000"
index 7887f44..03b1697 100644 (file)
@@ -11,7 +11,7 @@ hu    "Hungarian" "Magyar" 51%
 nl    "Dutch" "Nederlands" 66%
 pl    "Polish" "Polski" 76%
 pt    "Portuguese" "Português" 91%
-pt_BR "Portuguese (Brazil)" "Português (Brasil)" 99%
+pt_BR "Portuguese (Brazil)" "Português (Brasil)" 100%
 ro    "Romanian" "Romana" 78%
 fi    "Finnish" "Suomi" 32%
 el    "Greek" "Ελληνική" 48%
index 07423e3..58c9801 100644 (file)
@@ -235,7 +235,7 @@ seta notification_INFO_ITEM_WEAPON_PRIMORSEC "0" "0 = off, 1 = print to console,
 seta notification_INFO_ITEM_WEAPON_UNAVAILABLE "0" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_JETPACK_NOFUEL "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_JOIN_CONNECT "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
-seta notification_INFO_JOIN_PLAY "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_JOIN_PLAY "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_JOIN_PLAY_TEAM "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_KEEPAWAY_DROPPED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
 seta notification_INFO_KEEPAWAY_PICKUP "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
index 4d1691a..f4e6304 100644 (file)
@@ -41,8 +41,8 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, int
 
        if(layout)
        {
-               drawpic_aspect_skin(myPos, pic, vec2(0.7 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring_aspect(myPos + eX * 0.7 * mySize.x, ftos(stat), vec2(0.3 * mySize.x, mySize.y), color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(myPos, pic, vec2(0.5 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(myPos + eX * 0.5 * mySize.x, ftos(stat), vec2(0.5 * mySize.x, mySize.y), color, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
        else
                drawstring_aspect(myPos, ftos(stat), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -496,11 +496,16 @@ string race_status_name_prev;
 // Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
 int race_CheckName(string net_name)
 {
-       int i;
-       for (i=RANKINGS_CNT-1;i>=0;--i)
-               if(strdecolorize(grecordholder[i]) == strdecolorize(net_name))
-                       return i+1;
-       return 0;
+       int rank = 0;
+       string zoned_name = strzone(strdecolorize(entcs_GetName(player_localnum)));
+       for (int i = RANKINGS_CNT - 1; i >= 0; --i)
+               if (strdecolorize(grecordholder[i]) == zoned_name)
+               {
+                       rank = i + 1;
+                       break;
+               }
+       strfree(zoned_name);
+       return rank;
 }
 
 void race_showTime(string text, vector pos, vector timeText_ofs, float theTime, vector textSize, float f)
index b4da1dd..0bf9b8d 100644 (file)
@@ -52,21 +52,21 @@ void HUD_PressedKeys()
                mySize = newSize;
        }
 
-       vector keysize = vec2(mySize.x / 3, mySize.y / (3 - !autocvar_hud_panel_pressedkeys_attack));
+       vector keysize = vec2(mySize.x / (14/4), mySize.y / (3 - !autocvar_hud_panel_pressedkeys_attack));
        int pressedkeys = STAT(PRESSED_KEYS);
 
        if(autocvar_hud_panel_pressedkeys_attack)
        {
-               drawpic_aspect_skin(pos + eX * keysize.x * 0.5, ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawpic_aspect_skin(pos + eX * keysize.x * 1.5, ((pressedkeys & KEY_ATCK2) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos + eX * (3/4 * keysize.x), ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos + eX * (7/4 * keysize.x), ((pressedkeys & KEY_ATCK2) ? "key_atck2_inv.tga" : "key_atck2.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                pos.y += keysize.y;
        }
 
        drawpic_aspect_skin(pos, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize.x, ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize.x * 2, ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (10/4 * keysize.x), ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        pos.y += keysize.y;
-       drawpic_aspect_skin(pos, ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize.x, ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * keysize.x * 2, ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (1/4 * keysize.x), ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (9/4 * keysize.x), ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 }
index 4989aac..c48390b 100644 (file)
@@ -74,52 +74,65 @@ bool autocvar_hud_panel_scoreboard_spectators_showping = true;
 bool autocvar_hud_panel_scoreboard_spectators_aligned = false;
 float autocvar_hud_panel_scoreboard_minwidth = 0.4;
 
-// wrapper to put all possible scores titles through gettext
-string TranslateScoresLabel(string l)
+// mode 0: returns translated label
+// mode 1: prints name and description of all the labels
+string Label_getInfo(string label, int mode)
 {
-       switch(l)
+       if (mode == 1)
+               label = "bckills"; // first case in the switch
+
+       switch(label)
        {
-               case "bckills": return CTX(_("SCO^bckills"));
-               case "bctime": return CTX(_("SCO^bctime"));
-               case "caps": return CTX(_("SCO^caps"));
-               case "captime": return CTX(_("SCO^captime"));
-               case "deaths": return CTX(_("SCO^deaths"));
-               case "destroyed": return CTX(_("SCO^destroyed"));
-               case "dmg": return CTX(_("SCO^damage"));
-               case "dmgtaken": return CTX(_("SCO^dmgtaken"));
-               case "drops": return CTX(_("SCO^drops"));
-               case "faults": return CTX(_("SCO^faults"));
-               case "fckills": return CTX(_("SCO^fckills"));
-               case "goals": return CTX(_("SCO^goals"));
-               case "kckills": return CTX(_("SCO^kckills"));
-               case "kdratio": return CTX(_("SCO^kdratio"));
-               case "kd": return CTX(_("SCO^k/d"));
-               case "kdr": return CTX(_("SCO^kdr"));
-               case "kills": return CTX(_("SCO^kills"));
-               case "teamkills": return CTX(_("SCO^teamkills"));
-               case "laps": return CTX(_("SCO^laps"));
-               case "lives": return CTX(_("SCO^lives"));
-               case "losses": return CTX(_("SCO^losses"));
-               case "name": return CTX(_("SCO^name"));
-               case "sum": return CTX(_("SCO^sum"));
-               case "nick": return CTX(_("SCO^nick"));
-               case "objectives": return CTX(_("SCO^objectives"));
-               case "pickups": return CTX(_("SCO^pickups"));
-               case "ping": return CTX(_("SCO^ping"));
-               case "pl": return CTX(_("SCO^pl"));
-               case "pushes": return CTX(_("SCO^pushes"));
-               case "rank": return CTX(_("SCO^rank"));
-               case "returns": return CTX(_("SCO^returns"));
-               case "revivals": return CTX(_("SCO^revivals"));
-               case "rounds": return CTX(_("SCO^rounds won"));
-               case "score": return CTX(_("SCO^score"));
-               case "suicides": return CTX(_("SCO^suicides"));
-               case "takes": return CTX(_("SCO^takes"));
-               case "ticks": return CTX(_("SCO^ticks"));
-               default: return l;
+               case "bckills":      if (!mode) return CTX(_("SCO^bckills"));      else LOG_INFO(strcat("^3", "bckills", "            ^7", _("Number of ball carrier kills")));
+               case "bctime":       if (!mode) return CTX(_("SCO^bctime"));       else LOG_INFO(strcat("^3", "bctime", "             ^7", _("Total amount of time holding the ball in Keepaway")));
+               case "caps":         if (!mode) return CTX(_("SCO^caps"));         else LOG_INFO(strcat("^3", "caps", "               ^7", _("How often a flag (CTF) or a key (KeyHunt) was captured")));
+               case "captime":      if (!mode) return CTX(_("SCO^captime"));      else LOG_INFO(strcat("^3", "captime", "            ^7", _("Time of fastest capture (CTF)")));
+               case "deaths":       if (!mode) return CTX(_("SCO^deaths"));       else LOG_INFO(strcat("^3", "deaths", "             ^7", _("Number of deaths")));
+               case "destroyed":    if (!mode) return CTX(_("SCO^destroyed"));    else LOG_INFO(strcat("^3", "destroyed", "          ^7", _("Number of keys destroyed by pushing them into void")));
+               case "dmg":          if (!mode) return CTX(_("SCO^damage"));       else LOG_INFO(strcat("^3", "dmg", "                ^7", _("The total damage done")));
+               case "dmgtaken":     if (!mode) return CTX(_("SCO^dmgtaken"));     else LOG_INFO(strcat("^3", "dmgtaken", "           ^7", _("The total damage taken")));
+               case "drops":        if (!mode) return CTX(_("SCO^drops"));        else LOG_INFO(strcat("^3", "drops", "              ^7", _("Number of flag drops")));
+               case "elo":          if (!mode) return CTX(_("SCO^elo"));          else LOG_INFO(strcat("^3", "elo", "                ^7", _("Player ELO")));
+               case "fastest":      if (!mode) return CTX(_("SCO^fastest"));      else LOG_INFO(strcat("^3", "fastest", "            ^7", _("Time of fastest lap (Race/CTS)")));
+               case "faults":       if (!mode) return CTX(_("SCO^faults"));       else LOG_INFO(strcat("^3", "faults", "             ^7", _("Number of faults committed")));
+               case "fckills":      if (!mode) return CTX(_("SCO^fckills"));      else LOG_INFO(strcat("^3", "fckills", "            ^7", _("Number of flag carrier kills")));
+               case "fps":          if (!mode) return CTX(_("SCO^fps"));          else LOG_INFO(strcat("^3", "fps", "                ^7", _("FPS")));
+               case "frags":        if (!mode) return CTX(_("SCO^frags"));        else LOG_INFO(strcat("^3", "frags", "              ^7", _("Number of kills minus suicides")));
+               case "goals":        if (!mode) return CTX(_("SCO^goals"));        else LOG_INFO(strcat("^3", "goals", "              ^7", _("Number of goals scored")));
+               case "kckills":      if (!mode) return CTX(_("SCO^kckills"));      else LOG_INFO(strcat("^3", "kckills", "            ^7", _("Number of keys carrier kills")));
+               case "kd":           if (!mode) return CTX(_("SCO^k/d"));          else LOG_INFO(strcat("^3", "kd", "                 ^7", _("The kill-death ratio")));
+               case "kdr":          if (!mode) return CTX(_("SCO^kdr"));          else LOG_INFO(strcat("^3", "kdr", "                ^7", _("The kill-death ratio")));
+               case "kdratio":      if (!mode) return CTX(_("SCO^kdratio"));      else LOG_INFO(strcat("^3", "kdratio", "            ^7", _("The kill-death ratio")));
+               case "kills":        if (!mode) return CTX(_("SCO^kills"));        else LOG_INFO(strcat("^3", "kills", "              ^7", _("Number of kills")));
+               case "laps":         if (!mode) return CTX(_("SCO^laps"));         else LOG_INFO(strcat("^3", "laps", "               ^7", _("Number of laps finished (Race/CTS)")));
+               case "lives":        if (!mode) return CTX(_("SCO^lives"));        else LOG_INFO(strcat("^3", "lives", "              ^7", _("Number of lives (LMS)")));
+               case "losses":       if (!mode) return CTX(_("SCO^losses"));       else LOG_INFO(strcat("^3", "losses", "             ^7", _("Number of times a key was lost")));
+               case "name":         if (!mode) return CTX(_("SCO^name"));         else LOG_INFO(strcat("^3", "name", "               ^7", _("Player name")));
+               case "nick":         if (!mode) return CTX(_("SCO^nick"));         else LOG_INFO(strcat("^3", "nick", "               ^7", _("Player name")));
+               case "objectives":   if (!mode) return CTX(_("SCO^objectives"));   else LOG_INFO(strcat("^3", "objectives", "         ^7", _("Number of objectives destroyed")));
+               case "pickups":      if (!mode) return CTX(_("SCO^pickups"));      else LOG_INFO(strcat("^3", "pickups", "            ^7", _("How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up")));
+               case "ping":         if (!mode) return CTX(_("SCO^ping"));         else LOG_INFO(strcat("^3", "ping", "               ^7", _("Ping time")));
+               case "pl":           if (!mode) return CTX(_("SCO^pl"));           else LOG_INFO(strcat("^3", "pl", "                 ^7", _("Packet loss")));
+               case "pushes":       if (!mode) return CTX(_("SCO^pushes"));       else LOG_INFO(strcat("^3", "pushes", "             ^7", _("Number of players pushed into void")));
+               case "rank":         if (!mode) return CTX(_("SCO^rank"));         else LOG_INFO(strcat("^3", "rank", "               ^7", _("Player rank")));
+               case "returns":      if (!mode) return CTX(_("SCO^returns"));      else LOG_INFO(strcat("^3", "returns", "            ^7", _("Number of flag returns")));
+               case "revivals":     if (!mode) return CTX(_("SCO^revivals"));     else LOG_INFO(strcat("^3", "revivals", "           ^7", _("Number of revivals")));
+               case "rounds":       if (!mode) return CTX(_("SCO^rounds won"));   else LOG_INFO(strcat("^3", "rounds", "             ^7", _("Number of rounds won")));
+               case "score":        if (!mode) return CTX(_("SCO^score"));        else LOG_INFO(strcat("^3", "score", "              ^7", _("Total score")));
+               case "suicides":     if (!mode) return CTX(_("SCO^suicides"));     else LOG_INFO(strcat("^3", "suicides", "           ^7", _("Number of suicides")));
+               case "sum":          if (!mode) return CTX(_("SCO^sum"));          else LOG_INFO(strcat("^3", "sum", "                ^7", _("Number of kills minus deaths")));
+               case "takes":        if (!mode) return CTX(_("SCO^takes"));        else LOG_INFO(strcat("^3", "takes", "              ^7", _("Number of domination points taken (Domination)")));
+               case "teamkills":    if (!mode) return CTX(_("SCO^teamkills"));    else LOG_INFO(strcat("^3", "teamkills", "          ^7", _("Number of teamkills")));
+               case "ticks":        if (!mode) return CTX(_("SCO^ticks"));        else LOG_INFO(strcat("^3", "ticks", "              ^7", _("Number of ticks (Domination)")));
+               case "time":         if (!mode) return CTX(_("SCO^time"));         else LOG_INFO(strcat("^3", "time", "               ^7", _("Total time raced (Race/CTS)")));
+               default: return label;
        }
+       return label;
 }
 
+void PrintScoresLabels() { Label_getInfo(string_null, 1); }
+string TranslateScoresLabel(string label) { return Label_getInfo(label, 0); }
+
 void Scoreboard_InitScores()
 {
        int i, f;
@@ -306,41 +319,7 @@ void Cmd_Scoreboard_Help()
        LOG_INFO(_("The following field names are recognized (case insensitive):"));
        LOG_INFO("");
 
-       LOG_INFO(strcat("^3name^7                     ", _("Name of a player")));
-       LOG_INFO(strcat("^3nick^7                     ", _("Name of a player")));
-       LOG_INFO(strcat("^3ping^7                     ", _("Ping time")));
-       LOG_INFO(strcat("^3pl^7                       ", _("Packet loss")));
-       LOG_INFO(strcat("^3elo^7                      ", _("Player ELO")));
-       LOG_INFO(strcat("^3fps^7                      ", _("Player FPS")));
-       LOG_INFO(strcat("^3kills^7                    ", _("Number of kills")));
-       LOG_INFO(strcat("^3deaths^7                   ", _("Number of deaths")));
-       LOG_INFO(strcat("^3suicides^7                 ", _("Number of suicides")));
-       LOG_INFO(strcat("^3frags^7                    ", _("kills - suicides")));
-       LOG_INFO(strcat("^3teamkills^7                ", _("Number of teamkills")));
-       LOG_INFO(strcat("^3kd^7                       ", _("The kill-death ratio")));
-       LOG_INFO(strcat("^3dmg^7                      ", _("The total damage done")));
-       LOG_INFO(strcat("^3dmgtaken^7                 ", _("The total damage taken")));
-       LOG_INFO(strcat("^3sum^7                      ", _("kills - deaths")));
-       LOG_INFO(strcat("^3caps^7                     ", _("How often a flag (CTF) or a key (KeyHunt) was captured")));
-       LOG_INFO(strcat("^3pickups^7                  ", _("How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up")));
-       LOG_INFO(strcat("^3captime^7                  ", _("Time of fastest cap (CTF)")));
-       LOG_INFO(strcat("^3fckills^7                  ", _("Number of flag carrier kills")));
-       LOG_INFO(strcat("^3returns^7                  ", _("Number of flag returns")));
-       LOG_INFO(strcat("^3drops^7                    ", _("Number of flag drops")));
-       LOG_INFO(strcat("^3lives^7                    ", _("Number of lives (LMS)")));
-       LOG_INFO(strcat("^3rank^7                     ", _("Player rank")));
-       LOG_INFO(strcat("^3pushes^7                   ", _("Number of players pushed into void")));
-       LOG_INFO(strcat("^3destroyed^7                ", _("Number of keys destroyed by pushing them into void")));
-       LOG_INFO(strcat("^3kckills^7                  ", _("Number of keys carrier kills")));
-       LOG_INFO(strcat("^3losses^7                   ", _("Number of times a key was lost")));
-       LOG_INFO(strcat("^3laps^7                     ", _("Number of laps finished (race/cts)")));
-       LOG_INFO(strcat("^3time^7                     ", _("Total time raced (race/cts)")));
-       LOG_INFO(strcat("^3fastest^7                  ", _("Time of fastest lap (race/cts)")));
-       LOG_INFO(strcat("^3ticks^7                    ", _("Number of ticks (DOM)")));
-       LOG_INFO(strcat("^3takes^7                    ", _("Number of domination points taken (DOM)")));
-       LOG_INFO(strcat("^3bckills^7                  ", _("Number of ball carrier kills")));
-       LOG_INFO(strcat("^3bctime^7                   ", _("Total amount of time holding the ball in Keepaway")));
-       LOG_INFO(strcat("^3score^7                    ", _("Total score")));
+       PrintScoresLabels();
        LOG_INFO("");
 
        LOG_INFO(_("Before a field you can put a + or - sign, then a comma separated list\n"
@@ -845,7 +824,7 @@ void Scoreboard_DrawItem(vector item_pos, vector rgb, entity pl, bool is_self, i
 {
        TC(bool, is_self); TC(int, pl_number);
        string str;
-       bool is_spec = (entcs_GetTeam(pl.sv_entnum) == NUM_SPECTATOR);
+       bool is_spec = entcs_IsSpectating(pl.sv_entnum);
 
        vector h_pos = item_pos;
        vector h_size = vec2(panel_size.x, hud_fontsize.y * 1.25);
@@ -1459,6 +1438,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz
        vector text_ofs = vec2(0.5 * hud_fontsize.x, (1.25 - 1) / 2 * hud_fontsize.y); // center text vertically
        string str = "";
        int column = 0, j = 0;
+       string zoned_name_self = strzone(strdecolorize(entcs_GetName(player_localnum)));
        for(i = 0; i < RANKINGS_RECEIVED_CNT; ++i)
        {
                float t;
@@ -1466,7 +1446,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz
                if (t == 0)
                        continue;
 
-               if(strdecolorize(grecordholder[i]) == strdecolorize(entcs_GetName(player_localnum)))
+               if(strdecolorize(grecordholder[i]) == zoned_name_self)
                        drawfill(pos, columnsize, hl_rgb, sbt_highlight_alpha_self, DRAWFLAG_NORMAL);
                else if(!((j + column) & 1) && sbt_highlight)
                        drawfill(pos, columnsize, hl_rgb, sbt_highlight_alpha, DRAWFLAG_NORMAL);
@@ -1489,6 +1469,7 @@ vector Scoreboard_Rankings_Draw(vector pos, entity pl, vector rgb, vector bg_siz
                        pos.y = panel_pos.y;
                }
        }
+       strfree(zoned_name_self);
 
        panel_size.x += panel_bg_padding * 2; // restore initial width
        return end_pos;
index 2bbed4a..cdcb0d0 100644 (file)
@@ -421,7 +421,8 @@ MUTATOR_HOOKFUNCTION(ca, SpectateNext)
 {
        entity client = M_ARGV(0, entity);
 
-       if (!autocvar_g_ca_spectate_enemies && client.caplayer)
+       if (!autocvar_g_ca_spectate_enemies && client.caplayer
+               && Team_GetNumberOfAlivePlayers(Entity_GetTeam(client)))
        {
                entity targ = M_ARGV(1, entity);
                M_ARGV(1, entity) = CA_SpectateNext(client, targ);
@@ -435,7 +436,8 @@ MUTATOR_HOOKFUNCTION(ca, SpectatePrev)
        entity targ = M_ARGV(1, entity);
        entity first = M_ARGV(2, entity);
 
-       if (!autocvar_g_ca_spectate_enemies && client.caplayer)
+       if (!autocvar_g_ca_spectate_enemies && client.caplayer
+               && Team_GetNumberOfAlivePlayers(Entity_GetTeam(client)))
        {
                do { targ = targ.chain; }
                while(targ && DIFF_TEAM(targ, client));
@@ -448,6 +450,8 @@ MUTATOR_HOOKFUNCTION(ca, SpectatePrev)
                                return MUT_SPECPREV_RETURN;
                }
        }
+       else
+               return MUT_SPECPREV_CONTINUE;
 
        M_ARGV(1, entity) = targ;
 
index 1b93cbf..183706e 100644 (file)
 
     MSG_INFO_NOTIF(CONNECTING,                              N_CONSOLE,  1, 0, "s1", "",         "",     _("^BG%s^BG is connecting..."), "")
     MSG_INFO_NOTIF(JOIN_CONNECT,                            N_CHATCON,  1, 0, "s1", "",         "",     _("^BG%s^F3 connected"), "")
-    MSG_INFO_NOTIF(JOIN_PLAY,                               N_CONSOLE,  1, 0, "s1", "",         "",     _("^BG%s^F3 is now playing"), "")
+    MSG_INFO_NOTIF(JOIN_PLAY,                               N_CHATCON,  1, 0, "s1", "",         "",     _("^BG%s^F3 is now playing"), "")
     MULTITEAM_INFO(JOIN_PLAY_TEAM, 4,                       N_CHATCON,  1, 0, "s1", "",         "",     _("^BG%s^F3 is now playing on the ^TC^TT team"), "", NAME)
 
     MSG_INFO_NOTIF(KEEPAWAY_DROPPED,                        N_CONSOLE,  1, 0, "s1", "s1",       "notify_balldropped",       _("^BG%s^BG has dropped the ball!"), "")
index 213ad6f..c5d9854 100644 (file)
@@ -381,7 +381,7 @@ void PutObserverInServer(entity this)
                if(axh.owner == this && axh != NULL && !wasfreed(axh))
                        delete(axh);
        }
-       
+
        if (mutator_returnvalue)
        {
                // mutator prevents resetting teams+score
@@ -390,7 +390,9 @@ void PutObserverInServer(entity this)
        {
                SetPlayerTeam(this, -1, TEAM_CHANGE_SPECTATOR);
                this.frags = FRAGS_SPECTATOR;
-    }
+       }
+       if (CS(this).just_joined)
+               CS(this).just_joined = false;
 }
 
 int player_getspecies(entity this)
@@ -2746,6 +2748,24 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
        int privatemsgprefixlen = 0;
        if (msgin != "")
        {
+               bool found_me = false;
+               if(strstrofs(msgin, "/me", 0) >= 0)
+               {
+                       string newmsgin = "";
+                       string newnamestr = ((teamsay) ? strcat(colorstr, "(", colorprefix, namestr, colorstr, ")", "^7") : strcat(colorprefix, namestr, "^7"));
+                       FOREACH_WORD(msgin, true,
+                       {
+                               if(strdecolorize(it) == "/me")
+                               {
+                                       found_me = true;
+                                       newmsgin = cons(newmsgin, newnamestr);
+                               }
+                               else
+                                       newmsgin = cons(newmsgin, it);
+                       });
+                       msgin = newmsgin;
+               }
+
                if(privatesay)
                {
                        msgstr = strcat("\{1}\{13}* ", colorprefix, namestr, "^3 tells you: ^7");
@@ -2756,11 +2776,11 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
                }
                else if(teamsay)
                {
-                       if(strstrofs(msgin, "/me", 0) >= 0)
+                       if(found_me)
                        {
                                //msgin = strreplace("/me", "", msgin);
                                //msgin = substring(msgin, 3, strlen(msgin));
-                               msgin = strreplace("/me", strcat(colorstr, "(", colorprefix, namestr, colorstr, ")^7"), msgin);
+                               //msgin = strreplace("/me", strcat(colorstr, "(", colorprefix, namestr, colorstr, ")^7"), msgin);
                                msgstr = strcat("\{1}\{13}^4* ", "^7", msgin);
                        }
                        else
@@ -2769,12 +2789,12 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
                }
                else
                {
-                       if(strstrofs(msgin, "/me", 0) >= 0)
+                       if(found_me)
                        {
                                //msgin = strreplace("/me", "", msgin);
                                //msgin = substring(msgin, 3, strlen(msgin));
-                               msgin = strreplace("/me", strcat(colorprefix, namestr), msgin);
-                               msgstr = strcat("\{1}^4* ", "^7", msgin);
+                               //msgin = strreplace("/me", strcat(colorprefix, namestr), msgin);
+                               msgstr = strcat("\{1}^4* ^7", msgin);
                        }
                        else {
                                msgstr = "\{1}";
index e67625a..b768ccb 100644 (file)
@@ -36,8 +36,9 @@ string getrecords(int page)  // 50 records per page
 
        MapInfo_ClearTemps();
 
-       if (s == "" && page == 0) return "No records are available on this server.\n";
-       else return s;
+       if (s == "" && page == 0)
+               return "No records are available on this server for the current game mode.\n";
+       return s;
 }
 
 string getrankings()
index a301036..d9682ed 100644 (file)
@@ -227,10 +227,6 @@ bool SetPlayerTeam(entity player, int team_index, int type)
                                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE,
                                        player.netname);
                        }
-                       else
-                       {
-                               CS(player).just_joined = false;
-                       }
                }
                KillPlayerForTeamChange(player);
                if (!IS_BOT_CLIENT(player))
@@ -238,6 +234,11 @@ bool SetPlayerTeam(entity player, int team_index, int type)
                        TeamBalance_AutoBalanceBots();
                }
        }
+       else if (team_index == -1)
+       {
+               if (!CS(player).just_joined)
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, player.netname);
+       }
        return true;
 }