]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'drjaska/weaponindepency' into 'master'
authorLegendaryGuard <rootuser999@gmail.com>
Thu, 2 Jun 2022 20:02:55 +0000 (20:02 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Thu, 2 Jun 2022 20:02:55 +0000 (20:02 +0000)
weapon independency fixes

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

17 files changed:
.tx/merge-base
common.cs.po
common.es.po
common.es_MX.po
common.fr.po
common.it.po
common.kw.po
common.pt.po
common.pt_BR.po
common.tr.po
qcsrc/client/announcer.qc
qcsrc/client/hud/crosshair.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/view.qc
qcsrc/server/gamelog.qc
qcsrc/server/gamelog.qh
qcsrc/server/world.qc

index 4d7d48d7f8904c54792c24031b9521c120f15f29..41063ec71c4bb5c14c311f3b208ad893afd82c0d 100644 (file)
@@ -1 +1 @@
-Tue May  3 07:23:14 CEST 2022
+Sat May 28 07:23:08 CEST 2022
index f3b1672ff39ef3fc6dd0fd3e7e219aad83800480..ad3aef2178c0d5b10921796186cffec537237f09 100644 (file)
@@ -7,8 +7,8 @@
 # Adam Říha, 2021
 # Adam Říha, 2021
 # fasdasd sdasd <transifexalternativeaccount@yopmail.com>, 2021
-# gamingforyou875 <gamingforyou875@gmail.com>, 2019
-# gamingforyou875 <gamingforyou875@gmail.com>, 2019
+# GamingasCZ <gamingforyou875@gmail.com>, 2019
+# GamingasCZ <gamingforyou875@gmail.com>, 2019
 # Jan Kocka <kockahonza@gmail.com>, 2019
 # Jiří Vrána <jirkacz199@gmail.com>, 2020-2021
 # Martin Taibr <taibr.martin@gmail.com>, 2017
index 37c0666223f456e6bbd21fe076db243911935134..bc5b944904c7c25a0ed49b23ede8feb298818398 100644 (file)
@@ -40,7 +40,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
+"1 : 2;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
index 5254cde9ec127bbe27dd7fed7f3ba0494ad20049..1b96f5e140545af42efbac54df47b4ff204b3e69 100644 (file)
@@ -16,7 +16,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
+"1 : 2;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
index dfb67da7c8d983588dda57dc557c3d506f9aa88f..a291ce9c8dc13c19cdb1d0f42a15b051403b44b7 100644 (file)
@@ -30,7 +30,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
+"1000000 == 0 ? 1 : 2;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
index e9cb1afa4ae3e32a36df52c3a24bbc28c42e5fcc..962f1a75b55d7c41323de632a3ac7b9eaa3c6509 100644 (file)
@@ -23,7 +23,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
+"1 : 2;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
index dc32fd24b65e5592c98f4834492176656a8d4138..679a6c1db416b452510b5124a0becfef92c89bfe 100644 (file)
@@ -19,7 +19,13 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n == 1 ? 0 : n == 2 ? 1 : 2);\n"
+"Plural-Forms: nplurals=6; plural=n == 0 ? 0 : n == 1 ? 1 : (n % 100 == 2 || "
+"n % 100 == 22 || n % 100 == 42 || n % 100 == 62 || n % 100 == 82) || n % "
+"1000 == 0 && (n % 100000 >= 1000 && n % 100000 <= 20000 || n % 100000 == "
+"40000 || n % 100000 == 60000 || n % 100000 == 80000) || n != 0 && n % "
+"1000000 == 100000 ? 2 : (n % 100 == 3 || n % 100 == 23 || n % 100 == 43 || n "
+"% 100 == 63 || n % 100 == 83) ? 3 : n != 1 && (n % 100 == 1 || n % 100 == 21 "
+"|| n % 100 == 41 || n % 100 == 61 || n % 100 == 81) ? 4 : 5;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
index e3c8ef10646b9906c91d72451e98ef3d7bdc8fe0..83aaff5e8466b9e92ee9cb3d18a7ed0eb4b31d26 100644 (file)
@@ -24,7 +24,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
+"1000000 == 0 ? 1 : 2;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
index f99dbd8b78e8050722eb205de262b872c5ba85a7..65f14f8d39bd5eeccab10d5b2db96f67e4301a47 100644 (file)
@@ -25,7 +25,8 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
+"1000000 == 0 ? 1 : 2;\n"
 
 #: qcsrc/client/announcer.qc:45
 msgid "vs"
@@ -4356,7 +4357,7 @@ msgid ""
 "^F2^COUNT^BG until weapon change...\n"
 "Next weapon: ^F1%s"
 msgstr ""
-"^F2^CONTAGEM^BG até a mudança de arma...\n"
+"^F2^COUNT^BG até a mudança de arma...\n"
 "Próxima arma: ^F1%s"
 
 #: qcsrc/common/notifications/all.inc:719
index 187b3ea3de698d635eef120d07ddadcff3ace0e9..2f8e2c97b4e8cb8451b461d616c46f94ee95dcd8 100644 (file)
@@ -6,21 +6,21 @@
 # Abdurrahman AKKUŞ <a.rahmanakkus@hotmail.com>, 2019
 # Ahmet, 2022
 # Ahmet, 2022
-# Big Brother <tanakinci2002@gmail.com>, 2021
+# Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021
 # Çağlar Turalı <caglarturali@gmail.com>, 2018
 # Demiray Muhterem <mdemiray@msn.com>, 2018
-# Big Brother <tanakinci2002@gmail.com>, 2021
+# Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021
 # Gokdeniz.Kucukali, 2021
 # Gokdeniz.Kucukali, 2021
 # ibra kap <ibrakap@gmail.com>, 2019
-# Big Brother <tanakinci2002@gmail.com>, 2021
+# Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021
 msgid ""
 msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2022-04-17 07:22+0200\n"
 "PO-Revision-Date: 2013-09-12 16:53+0000\n"
-"Last-Translator: Big Brother <tanakinci2002@gmail.com>, 2021\n"
+"Last-Translator: Tan Siret Akıncı <tanakinci2002@gmail.com>, 2021\n"
 "Language-Team: Turkish (http://www.transifex.com/team-xonotic/xonotic/"
 "language/tr/)\n"
 "Language: tr\n"
index 9d70b3e270715223a65297870c3b41f7c554d3e0..d46595e8718bde0a2007fb276a6e54ab6b49d7ca 100644 (file)
@@ -230,6 +230,9 @@ void Announcer_Time()
 
 void Announcer()
 {
+       // announcer code sets gametype name as centerprint title
+       if(!gametype)
+               return;
        Announcer_Gamestart();
        Announcer_Time();
 }
index cf2c01d971f134ec41ca51d1e04e175c83c9cf00..229a6024084df01cbabefa97a02de385a558a86a 100644 (file)
@@ -63,9 +63,8 @@ float EnemyHitCheck()
        if(n > maxclients)
                return SHOTTYPE_HITWORLD;
        t = entcs_GetTeam(n - 1);
-       if(teamplay)
-               if(t == myteam)
-                       return SHOTTYPE_HITTEAM;
+       if(teamplay && t == myteam)
+               return SHOTTYPE_HITTEAM;
        if(t == NUM_SPECTATOR)
                return SHOTTYPE_HITWORLD;
        return SHOTTYPE_HITENEMY;
index ed8715e022909cd1545784a29c222d3d1d130c92..0d0a44b6a295f839a7516ac210f96a685edee8bc 100644 (file)
@@ -2110,8 +2110,7 @@ void Scoreboard_Draw()
 
        // print information about respawn status
        float respawn_time = STAT(RESPAWN_TIME);
-       if(!intermission)
-       if(respawn_time)
+       if(!intermission && respawn_time)
        {
                if(respawn_time < 0)
                {
index 855d20f818fbf7d04028cd255ec5067f42ab25f8..a183c82d0ad04e2482cf522e73b94399d596cffd 100644 (file)
@@ -868,41 +868,46 @@ void HUD_Draw(entity this)
        Hud_Dynamic_Frame();
 
        if(!intermission)
-       if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
        {
-               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
-       }
-       else if(STAT(FROZEN))
-       {
-               vector col = '0.25 0.90 1';
-               float col_fade = max(0, STAT(REVIVE_PROGRESS) * 2 - 1);
-               float alpha_fade = 0.3 + 0.7 * (1 - max(0, STAT(REVIVE_PROGRESS) * 4 - 3));
-               if(col_fade)
-                       col += vec3(col_fade, -col_fade, -col_fade);
-               drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_fade, DRAWFLAG_ADDITIVE);
+               if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
+               {
+                       drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), M_ARGV(0, vector), autocvar_hud_colorflash_alpha * M_ARGV(1, float), DRAWFLAG_ADDITIVE);
+               }
+               else if(STAT(FROZEN))
+               {
+                       vector col = '0.25 0.90 1';
+                       float col_fade = max(0, STAT(REVIVE_PROGRESS) * 2 - 1);
+                       float alpha_fade = 0.3 + 0.7 * (1 - max(0, STAT(REVIVE_PROGRESS) * 4 - 3));
+                       if(col_fade)
+                               col += vec3(col_fade, -col_fade, -col_fade);
+                       drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_fade, DRAWFLAG_ADDITIVE);
+               }
        }
 
        HUD_Scale_Enable();
        if(!intermission)
-       if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
-       {
-               vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
-               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
-               drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
-       }
-       else if(STAT(CAPTURE_PROGRESS))
-       {
-               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
-               drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
-       }
-       else if(STAT(REVIVE_PROGRESS))
        {
-               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
-               drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+               if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
+               {
+                       vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
+                       DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+                       drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+               }
+               else if(STAT(CAPTURE_PROGRESS))
+               {
+                       DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+                       drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+               }
+               else if(STAT(REVIVE_PROGRESS))
+               {
+                       DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+                       drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
+               }
        }
        HUD_Scale_Disable();
 
        if(autocvar_r_letterbox == 0)
+       {
                if(autocvar_viewsize < 120)
                {
                        if(!MUTATOR_CALLHOOK(DrawScoreboardAccuracy))
@@ -911,6 +916,7 @@ void HUD_Draw(entity this)
                        HUD_Main();
                        HUD_Scale_Disable();
                }
+       }
 
        // crosshair goes VERY LAST
        UpdateDamage();
index f89cf18a0335c284f531de6a385e0bc5ca346a59..1b308d0940de2bcbcfb0ab9a79bcd4c76d06f5e6 100644 (file)
@@ -1,5 +1,7 @@
 #include "gamelog.qh"
-
+#include <server/intermission.qh>    // GetGametype(), GetMapname()
+#include <server/weapons/tracing.qh> // autocvar_g_norecoil
+#include <server/world.qh>           // matchid
 #include <server/main.qh>
 
 string GameLog_ProcessIP(string s)
@@ -41,8 +43,32 @@ void GameLogEcho(string s)
 
 void GameLogInit()
 {
-       logfile_open = false;
-       // will be opened later
+       GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", matchid));
+       string s = ":gameinfo:mutators:LIST";
+
+       MUTATOR_CALLHOOK(BuildMutatorsString, s);
+       s = M_ARGV(0, string);
+
+       // initialiation stuff, not good in the mutator system
+       if(!autocvar_g_use_ammunition)
+               s = strcat(s, ":no_use_ammunition");
+
+       // initialiation stuff, not good in the mutator system
+       if(autocvar_g_pickup_items == 0)
+               s = strcat(s, ":no_pickup_items");
+       if(autocvar_g_pickup_items > 0)
+               s = strcat(s, ":pickup_items");
+
+       // initialiation stuff, not good in the mutator system
+       if(autocvar_g_weaponarena != "0")
+               s = strcat(s, ":", autocvar_g_weaponarena, " arena");
+
+       // TODO to mutator system
+       if(autocvar_g_norecoil)
+               s = strcat(s, ":norecoil");
+
+       GameLogEcho(s);
+       GameLogEcho(":gameinfo:end");
 }
 
 void GameLogClose()
index f96679b819d62eb36629bbaf9e4f9916320205cc..99ac37c3c762e8803b32634363f321db5da7af69 100644 (file)
@@ -9,7 +9,7 @@ string autocvar_sv_eventlog_files_namesuffix;
 bool autocvar_sv_eventlog_files_timestamps;
 bool autocvar_sv_eventlog_ipv6_delimiter = false;
 
-bool logfile_open;
+bool logfile_open = false;
 float logfile;
 
 string GameLog_ProcessIP(string s);
index fca7c1741497e7a092245ad376744a1b3e4b630a..6c2e4a3f71b906f18242bf69ac8220aab0b6d2ab 100644 (file)
@@ -35,7 +35,6 @@
 #include <server/damage.qh>
 #include <server/gamelog.qh>
 #include <server/hook.qh>
-#include <server/intermission.qh>
 #include <server/ipban.qh>
 #include <server/items/items.qh>
 #include <server/main.qh>
@@ -46,7 +45,6 @@
 #include <server/scores_rules.qh>
 #include <server/spawnpoints.qh>
 #include <server/teamplay.qh>
-#include <server/weapons/common.qh>
 #include <server/weapons/weaponstats.qh>
 
 const float LATENCY_THINKRATE = 10;
@@ -844,46 +842,15 @@ spawnfunc(worldspawn)
 
        WaypointSprite_Init();
 
-       GameLogInit(); // prepare everything
        // NOTE for matchid:
        // changing the logic generating it is okay. But:
        // it HAS to stay <= 64 chars
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
-       if(autocvar_sv_eventlog)
-       {
-               string num = strftime_s(); // strftime(false, "%s") isn't reliable, see strftime_s description
-               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), num, floor(random() * 1000000));
-               matchid = strzone(s);
-
-               GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
-               s = ":gameinfo:mutators:LIST";
-
-               MUTATOR_CALLHOOK(BuildMutatorsString, s);
-               s = M_ARGV(0, string);
-
-               // initialiation stuff, not good in the mutator system
-               if(!autocvar_g_use_ammunition)
-                       s = strcat(s, ":no_use_ammunition");
-
-               // initialiation stuff, not good in the mutator system
-               if(autocvar_g_pickup_items == 0)
-                       s = strcat(s, ":no_pickup_items");
-               if(autocvar_g_pickup_items > 0)
-                       s = strcat(s, ":pickup_items");
+       // strftime(false, "%s") isn't reliable, see strftime_s description
+       matchid = strzone(sprintf("%d.%s.%06d", autocvar_sv_eventlog_files_counter, strftime_s(), random() * 1000000));
 
-               // initialiation stuff, not good in the mutator system
-               if(autocvar_g_weaponarena != "0")
-                       s = strcat(s, ":", autocvar_g_weaponarena, " arena");
-
-               // TODO to mutator system
-               if(autocvar_g_norecoil)
-                       s = strcat(s, ":norecoil");
-
-               GameLogEcho(s);
-               GameLogEcho(":gameinfo:end");
-       }
-       else
-               matchid = strzone(ftos(random()));
+       if(autocvar_sv_eventlog)
+               GameLogInit(); // requires matchid to be set
 
        cvar_set("nextmap", "");