]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/welcome_dialog_translatable
authorterencehill <piuntn@gmail.com>
Thu, 31 Mar 2022 16:32:53 +0000 (18:32 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 31 Mar 2022 16:32:53 +0000 (18:32 +0200)
# Conflicts:
# qcsrc/client/main.qc
# qcsrc/server/client.qc

17 files changed:
qcsrc/client/main.qc
qcsrc/common/mutators/mutator/hook/_mod.inc
qcsrc/common/mutators/mutator/hook/_mod.qh
qcsrc/common/mutators/mutator/hook/cl_hook.qc [new file with mode: 0644]
qcsrc/common/mutators/mutator/hook/cl_hook.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/hook/sv_hook.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/offhand_blaster/_mod.inc
qcsrc/common/mutators/mutator/offhand_blaster/_mod.qh
qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc [new file with mode: 0644]
qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qh [new file with mode: 0644]
qcsrc/common/mutators/mutator/offhand_blaster/sv_offhand_blaster.qc
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc
qcsrc/server/client.qc
qcsrc/server/world.qc

index 75fb7169e1017755cef2531825d0f9f68c5d5cca..c7f4d576c73d7b61a8bec8da38e8ff4f30c31223 100644 (file)
@@ -1314,6 +1314,52 @@ NET_HANDLE(TE_CSQC_WEAPONCOMPLAIN, bool isNew)
        }
 }
 
+string translate_modifications(string s)
+{
+       return build_mutator_list(s);
+}
+
+string translate_weaponarena(string s)
+{
+       if (s == "") return s;
+       if (s == "All Weapons Arena") return _("All Weapons Arena");
+       if (s == "Dev All Weapons Arena") return s; // development option, do not translate
+       if (s == "Most Weapons Arena") return _("Most Weapons Arena");
+       if (s == "All Available Weapons Arena") return _("All Available Weapons Arena");
+       if (s == "Dev All Available Weapons Arena") return s; // development option, do not translate
+       if (s == "Most Available Weapons Arena") return _("Most Available Weapons Arena");
+       if (s == "No Weapons Arena") return _("No Weapons Arena");
+
+       int n = tokenizebyseparator(s, " & ");
+       string wpn_list = "";
+       for (int i = 0; i < n; i++)
+       {
+               Weapon wep = Weapon_from_name(argv(i));
+               if (wep == WEP_Null)
+                       LOG_INFO("^3Warning: ^7server sent an invalid weapon name\n");
+               wpn_list = cons_mid(wpn_list, " & ", wep.m_name);
+       }
+       return sprintf(_("%s Arena"), wpn_list);
+}
+
+string GetVersionMessage(string hostversion, bool version_mismatch, bool version_check)
+{
+       string xonotic_hostversion = strcat("Xonotic ", hostversion);
+       if (version_mismatch)
+       {
+               if(!version_check)
+                       return strcat(sprintf(_("This is %s"), xonotic_hostversion), "\n^3",
+                               _("Your client version is outdated."), "\n\n\n",
+                               _("### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###"), "\n\n\n",
+                               _("Please update!"));
+               else
+                       return strcat(sprintf(_("This is %s"), xonotic_hostversion), "\n^3",
+                               _("This server is using an outdated Xonotic version."), "\n\n\n",
+                               _("### THIS SERVER IS INCOMPATIBLE AND THUS YOU CANNOT JOIN ###"));
+       }
+       return sprintf(_("Welcome to %s"), xonotic_hostversion);
+}
+
 bool net_handle_ServerWelcome()
 {
        bool campaign = ReadByte();
@@ -1337,20 +1383,32 @@ bool net_handle_ServerWelcome()
 
        bool force_centerprint = ReadByte();
        string hostname = ReadString();
-       string ver = ReadString();
-       string modifications = ReadString();
+
+       string hostversion = ReadString();
+       bool version_mismatch = ReadByte();
+       bool version_check = ReadByte();
+       string ver = GetVersionMessage(hostversion, version_mismatch, version_check);
+
+       string modifications = translate_modifications(ReadString());
+       string weaponarena_list = translate_weaponarena(ReadString());
        string cache_mutatormsg = ReadString();
-       string mutator_msg = ReadString();
        string motd = ReadString();
 
        string msg = "";
        msg = strcat(msg, ver);
        msg = strcat(msg, "^8\n\n", strcat(_("Gametype:"), " ^1", MapInfo_Type_ToText(gametype)), "^8\n");
+
+       modifications = cons_mid(modifications, ", ", weaponarena_list);
        if(modifications != "")
                msg = strcat(msg, "^8\n", _("Active modifications:"), " ^3", modifications, "^8\n");
+
        if (cache_mutatormsg != "")
                msg = strcat(msg, "\n\n^8", _("Special gameplay tips:"), " ^7", cache_mutatormsg);
+       string mutator_msg = "";
+       MUTATOR_CALLHOOK(BuildGameplayTipsString, mutator_msg);
+       mutator_msg = M_ARGV(0, string);
        msg = strcat(msg, mutator_msg); // trust that the mutator will do proper formatting
+
        if (motd != "")
                msg = strcat(msg, "\n\n^8", _("MOTD:"), " ^7", motd);
 
index e5e68b6106fed48992f8d3d743eb9f087ac168c6..626c4cffa673fed98b3a14f972594068a0eaca51 100644 (file)
@@ -1,4 +1,7 @@
 // generated file; do not modify
+#ifdef CSQC
+    #include <common/mutators/mutator/hook/cl_hook.qc>
+#endif
 #ifdef SVQC
     #include <common/mutators/mutator/hook/sv_hook.qc>
 #endif
index 5a5d26e8172fd5ee077fc200e18a519b64acca0c..1216e36e8bacd8feb26deba268219a1c334c921d 100644 (file)
@@ -1,4 +1,7 @@
 // generated file; do not modify
+#ifdef CSQC
+    #include <common/mutators/mutator/hook/cl_hook.qh>
+#endif
 #ifdef SVQC
     #include <common/mutators/mutator/hook/sv_hook.qh>
 #endif
diff --git a/qcsrc/common/mutators/mutator/hook/cl_hook.qc b/qcsrc/common/mutators/mutator/hook/cl_hook.qc
new file mode 100644 (file)
index 0000000..4c8b262
--- /dev/null
@@ -0,0 +1,13 @@
+#include "cl_hook.qh"
+
+#ifdef CSQC
+REGISTER_MUTATOR(cl_hook, true);
+
+MUTATOR_HOOKFUNCTION(cl_hook, BuildGameplayTipsString)
+{
+       string key = getcommandkey(_("off-hand hook"), "+hook");
+       M_ARGV(0, string) = strcat(M_ARGV(0, string),
+               "\n\n", sprintf(_("^3grappling hook^8 is enabled, press ^3%s^8 to use it"), key), "\n");
+}
+
+#endif
diff --git a/qcsrc/common/mutators/mutator/hook/cl_hook.qh b/qcsrc/common/mutators/mutator/hook/cl_hook.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index c6a595363c3a272f64b4a4e0f89de37c7e94e9c6..94379cbb2828410315ee8312c1f42844a32dcdb1 100644 (file)
@@ -30,11 +30,6 @@ MUTATOR_HOOKFUNCTION(hook, BuildMutatorsPrettyString)
     M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Hook");
 }
 
-MUTATOR_HOOKFUNCTION(hook, BuildGameplayTipsString)
-{
-    M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3grappling hook^8 is enabled, press 'e' (+hook) to use it\n");
-}
-
 MUTATOR_HOOKFUNCTION(hook, SetStartItems)
 {
     if(autocvar_g_grappling_hook_useammo)
index 7a00bd686b5b122b4b481e42fced7119becc67ce..36531e87f4eae03506833482a573f0bb98354563 100644 (file)
@@ -117,6 +117,14 @@ MUTATOR_HOOKFUNCTION(cl_nades, EditProjectile)
        else
                proj.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
 }
+
+MUTATOR_HOOKFUNCTION(cl_nades, BuildGameplayTipsString)
+{
+       string key = getcommandkey(_("drop weapon / throw nade"), "dropweapon");
+       M_ARGV(0, string) = strcat(M_ARGV(0, string),
+               "\n\n", sprintf(_("^3nades^8 are enabled, press ^3%s^8 to use them"), key), "\n");
+}
+
 bool Projectile_isnade(int p)
 {
        return Nade_FromProjectile(p) != NADE_TYPE_Null;
@@ -1569,9 +1577,4 @@ MUTATOR_HOOKFUNCTION(nades, BuildMutatorsString)
        M_ARGV(0, string) = strcat(M_ARGV(0, string), ":Nades");
 }
 
-MUTATOR_HOOKFUNCTION(nades, BuildGameplayTipsString)
-{
-       M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3nades^8 are enabled, press 'g' (dropweapon) to use them\n");
-}
-
 #endif
index 41bb01e55eeaee272278e8ede77ab4f8c05be397..0a555570d1d6f6b83db21e4ee1275425cfde8542 100644 (file)
@@ -1,4 +1,7 @@
 // generated file; do not modify
+#ifdef CSQC
+    #include <common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc>
+#endif
 #ifdef SVQC
     #include <common/mutators/mutator/offhand_blaster/sv_offhand_blaster.qc>
 #endif
index 5e11096a532644d671eb7bd409b0519e08d3c3bd..2c4587f417b2e1e3820e3f4b1facd22e55b1d772 100644 (file)
@@ -1,4 +1,7 @@
 // generated file; do not modify
+#ifdef CSQC
+    #include <common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qh>
+#endif
 #ifdef SVQC
     #include <common/mutators/mutator/offhand_blaster/sv_offhand_blaster.qh>
 #endif
diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc b/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc
new file mode 100644 (file)
index 0000000..ebf44d0
--- /dev/null
@@ -0,0 +1,10 @@
+#include "cl_offhand_blaster.qh"
+
+REGISTER_MUTATOR(cl_offhand_blaster, true);
+
+MUTATOR_HOOKFUNCTION(cl_offhand_blaster, BuildGameplayTipsString)
+{
+       string key = getcommandkey(_("off-hand hook"), "+hook");
+       M_ARGV(0, string) = strcat(M_ARGV(0, string),
+               "\n\n", sprintf(_("^3offhand blaster^8 is enabled, press ^3%s^8 to use it"), key), "\n");
+}
diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qh b/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index fbffa8a439cd241d5977bde45d876661fdcb9c7e..931ab1ad9991f517cde5ab95e56f5f4dd53a9db7 100644 (file)
@@ -14,11 +14,6 @@ MUTATOR_HOOKFUNCTION(offhand_blaster, BuildMutatorsPrettyString)
        M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Offhand blaster");
 }
 
-MUTATOR_HOOKFUNCTION(offhand_blaster, BuildGameplayTipsString)
-{
-    M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3offhand blaster^8 is enabled, press 'e' (+hook) to use it\n");
-}
-
 MUTATOR_HOOKFUNCTION(offhand_blaster, PlayerSpawn)
 {
        entity player = M_ARGV(0, entity);
index 469ab50d8c809bc4d52d6d4d27e3cc70693b7722..cea6c03ff9dedf5658926b982f739ca02d7565ad 100644 (file)
@@ -210,6 +210,48 @@ string draw_UseSkinFor(string pic)
        else
                return strcat(draw_currentSkin, "/", pic);
 }
+
+// if s == "" (MENUQC) builds the mutator list for the Mutators dialog based on local cvar values
+// otherwise (CSQC) translates the mutator list (s) that client has received from server
+// NOTE: this function merges MENUQC and CSQC code in order to avoid duplicating and separating strings
+string build_mutator_list(string s)
+{
+       int i = -1, n = 0; // allow only 1 iteration in the following for loop if (s == "")
+       if (s != "")
+       {
+               i = 0;
+               n = tokenizebyseparator(s, ", ");
+       }
+       string s2 = "";
+       for (string arg = ""; i < n; i++)
+       {
+               if (i >= 0) arg = argv(i);
+               if(arg == "Dodging"                                     || (!n && cvar("g_dodging")))                                   s2 = cons_mid(s2, ", ", _("Dodging"));
+               if(arg == "InstaGib"                            || (!n && cvar("g_instagib")))                                  s2 = cons_mid(s2, ", ", _("InstaGib"));
+               if(arg == "New Toys"                            || (!n && cvar("g_new_toys")))                                  s2 = cons_mid(s2, ", ", _("New Toys"));
+               if(arg == "NIX"                                         || (!n && cvar("g_nix")))                                               s2 = cons_mid(s2, ", ", _("NIX"));
+               if(arg == "Rocket Flying"                       || (!n && cvar("g_rocket_flying")))                             s2 = cons_mid(s2, ", ", _("Rocket Flying"));
+               if(arg == "Invincible Projectiles"      || (!n && cvar("g_invincible_projectiles")))    s2 = cons_mid(s2, ", ", _("Invincible Projectiles"));
+               if(arg == "Low gravity"                         || (!n && cvar("sv_gravity") < stof(cvar_defstring("sv_gravity"))))     s2 = cons_mid(s2, ", ", _("Low gravity"));
+               if(arg == "Cloaked"                                     || (!n && cvar("g_cloaked")))                                   s2 = cons_mid(s2, ", ", _("Cloaked"));
+               if(arg == "Hook"                                        || (!n && cvar("g_grappling_hook")))                    s2 = cons_mid(s2, ", ", _("Hook"));
+               if(arg == "Midair"                                      || (!n && cvar("g_midair")))                                    s2 = cons_mid(s2, ", ", _("Midair"));
+               if(arg == "Melee only"                          || (!n && cvar("g_melee_only")))                                s2 = cons_mid(s2, ", ", _("Melee only"));
+               if(arg == "Vampire"                                     || (!n && cvar("g_vampire")))                                   s2 = cons_mid(s2, ", ", _("Vampire"));
+               if(arg == "Piñata"                                     || (!n && cvar("g_pinata")))                                    s2 = cons_mid(s2, ", ", _("Piñata"));
+               if(arg == "Weapons stay"                        || (!n && cvar("g_weapon_stay")))                               s2 = cons_mid(s2, ", ", _("Weapons stay"));
+               if(arg == "Blood loss"                          || (!n && cvar("g_bloodloss") > 0))                             s2 = cons_mid(s2, ", ", _("Blood loss"));
+               if(arg == "Jetpack"                                     || (!n && cvar("g_jetpack")))                                   s2 = cons_mid(s2, ", ", _("Jetpack"));
+               if(arg == "Buffs"                                       || (!n && cvar("g_buffs") > 0))                                 s2 = cons_mid(s2, ", ", _("Buffs"));
+               if(arg == "Overkill"                            || (!n && cvar("g_overkill")))                                  s2 = cons_mid(s2, ", ", _("Overkill"));
+               if(arg == "No powerups"                         || (!n && cvar("g_powerups") == 0))                             s2 = cons_mid(s2, ", ", _("No powerups"));
+               if(arg == "Powerups"                            || (!n && cvar("g_powerups") > 0))                              s2 = cons_mid(s2, ", ", _("Powerups"));
+               if(arg == "Touch explode"                       || (!n && cvar("g_touchexplode") > 0))                  s2 = cons_mid(s2, ", ", _("Touch explode"));
+               if(arg == "Wall jumping"                        || (!n && cvar("g_walljump")))                                  s2 = cons_mid(s2, ", ", _("Wall jumping"));
+               if(arg == "No start weapons"            || (!n && cvar_string("g_weaponarena") == "0" && cvar("g_balance_blaster_weaponstartoverride") == 0))   s2 = cons_mid(s2, ", ", _("No start weapons"));
+       }
+       return s2;
+}
 #endif
 
 void wordwrap_cb(string s, float l, void(string) callback)
index 1334f5ec35c392d41be44559cade95dc561931c7..8a6da62a60c96670e8f46be224801cd9801f089a 100644 (file)
@@ -44,6 +44,8 @@ void wordwrap_cb(string s, float l, void(string) callback);
 #ifndef SVQC
 string draw_currentSkin;
 string draw_UseSkinFor(string pic);
+
+string build_mutator_list(string s);
 #endif
 
 // iterative depth-first search, with fields that go "up", "down left" and "right" in a tree
index 7473e8e8da66619524e0abdfefd2592f6fb85c36..d35415df6606f9c951fbf7e34609243509808797 100644 (file)
@@ -52,55 +52,9 @@ string WeaponArenaString()
 
 string XonoticMutatorsDialog_toString(entity me)
 {
-       string s = "";
-       if(cvar("g_dodging"))
-               s = cons_mid(s, ", ", _("Dodging"));
-       if(cvar("g_instagib"))
-               s = cons_mid(s, ", ", _("InstaGib"));
-       if(cvar("g_new_toys"))
-               s = cons_mid(s, ", ", _("New Toys"));
-       if(cvar("g_nix"))
-               s = cons_mid(s, ", ", _("NIX"));
-       if(cvar("g_rocket_flying"))
-               s = cons_mid(s, ", ", _("Rocket Flying"));
-       if(cvar("g_invincible_projectiles"))
-               s = cons_mid(s, ", ", _("Invincible Projectiles"));
+       string s = build_mutator_list("");
        if(cvar_string("g_weaponarena") != "0")
                s = cons_mid(s, ", ", WeaponArenaString());
-       else if(cvar("g_balance_blaster_weaponstartoverride") == 0)
-               s = cons_mid(s, ", ", _("No start weapons"));
-       if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity")))
-               s = cons_mid(s, ", ", _("Low gravity"));
-       if(cvar("g_cloaked"))
-               s = cons_mid(s, ", ", _("Cloaked"));
-       if(cvar("g_grappling_hook"))
-               s = cons_mid(s, ", ", _("Hook"));
-       if(cvar("g_midair"))
-               s = cons_mid(s, ", ", _("Midair"));
-       if(cvar("g_melee_only"))
-               s = cons_mid(s, ", ", _("Melee only"));
-       if(cvar("g_vampire"))
-               s = cons_mid(s, ", ", _("Vampire"));
-       if(cvar("g_pinata"))
-               s = cons_mid(s, ", ", _("Piñata"));
-       if(cvar("g_weapon_stay"))
-               s = cons_mid(s, ", ", _("Weapons stay"));
-       if(cvar("g_bloodloss") > 0)
-               s = cons_mid(s, ", ", _("Blood loss"));
-       if(cvar("g_jetpack"))
-               s = cons_mid(s, ", ", _("Jetpack"));
-       if(cvar("g_buffs") > 0)
-               s = cons_mid(s, ", ", _("Buffs"));
-       if(cvar("g_overkill"))
-               s = cons_mid(s, ", ", _("Overkill"));
-       if(cvar("g_powerups") == 0)
-               s = cons_mid(s, ", ", _("No powerups"));
-       if(cvar("g_powerups") > 0)
-               s = cons_mid(s, ", ", _("Powerups"));
-       if(cvar("g_touchexplode") > 0)
-               s = cons_mid(s, ", ", _("Touch explode"));
-       if(cvar("g_walljump"))
-               s = cons_mid(s, ", ", _("Wall jumping"));
        if(s == "")
                return ZCTX(_("MUT^None"));
        else
index a5f508851b00876304e486f92f9fcb9634d6f438..6422f0dd56a9abdfe25407b59323579be1502218 100644 (file)
@@ -1018,21 +1018,6 @@ void ClientPreConnect(entity this)
 }
 #endif
 
-string GetClientVersionMessage(entity this)
-{
-       if (CS(this).version_mismatch) {
-               if(CS(this).version < autocvar_gameversion) {
-                       return strcat("This is Xonotic ", autocvar_g_xonoticversion,
-                               "\n^3Your client version is outdated.\n\n\n### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###\n\n\nPlease update!!!^8");
-               } else {
-                       return strcat("This is Xonotic ", autocvar_g_xonoticversion,
-                               "\n^3This server is using an outdated Xonotic version.\n\n\n ### THIS SERVER IS INCOMPATIBLE AND THUS YOU CANNOT JOIN ###.^8");
-               }
-       } else {
-               return strcat("Welcome to Xonotic ", autocvar_g_xonoticversion);
-       }
-}
-
 void SendWelcomemessage(entity this, bool force_centerprint)
 {
        msg_entity = this;
@@ -1052,30 +1037,27 @@ void SendWelcomemessage_msg_type(entity this, bool force_centerprint, int msg_ty
        }
        WriteByte(msg_type, force_centerprint);
        WriteString(msg_type, autocvar_hostname);
-       WriteString(msg_type, GetClientVersionMessage(this));
+       WriteString(msg_type, autocvar_g_xonoticversion);
+       WriteByte(msg_type, CS(this).version_mismatch);
+       WriteByte(msg_type, (CS(this).version < autocvar_gameversion));
 
        MUTATOR_CALLHOOK(BuildMutatorsPrettyString, "");
        string modifications = M_ARGV(0, string);
 
-       if(g_weaponarena)
-       {
-               if(g_weaponarena_random)
-                       modifications = strcat(modifications, ", ", ftos(g_weaponarena_random), " of ", g_weaponarena_list, " Arena");
-               else
-                       modifications = strcat(modifications, ", ", g_weaponarena_list, " Arena");
-       }
-       else if(cvar("g_balance_blaster_weaponstartoverride") == 0)
+       if (!g_weaponarena && cvar("g_balance_blaster_weaponstartoverride") == 0)
                modifications = strcat(modifications, ", No start weapons");
        if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity")))
                modifications = strcat(modifications, ", Low gravity");
        if(g_weapon_stay && !g_cts)
                modifications = strcat(modifications, ", Weapons stay");
        if(autocvar_g_jetpack)
-               modifications = strcat(modifications, ", Jet pack");
+               modifications = strcat(modifications, ", Jetpack");
        modifications = substring(modifications, 2, strlen(modifications) - 2);
 
        WriteString(msg_type, modifications);
 
+       WriteString(msg_type, g_weaponarena_list);
+
        if(cache_lastmutatormsg != autocvar_g_mutatormsg)
        {
                strcpy(cache_lastmutatormsg, autocvar_g_mutatormsg);
@@ -1084,11 +1066,6 @@ void SendWelcomemessage_msg_type(entity this, bool force_centerprint, int msg_ty
 
        WriteString(msg_type, cache_mutatormsg);
 
-       string mutator_msg = "";
-       MUTATOR_CALLHOOK(BuildGameplayTipsString, mutator_msg);
-       mutator_msg = M_ARGV(0, string);
-
-       WriteString(msg_type, mutator_msg); // trust that the mutator will do proper formatting
        WriteString(msg_type, strreplace("\\n", "\n", autocvar_sv_motd));
 }
 
index 5801fae88a3eb2fbd06d091e81bed09b779c38d4..9d4678ffd4814a04aed3a0185828e36dfbf8026a 100644 (file)
@@ -1884,25 +1884,25 @@ void readplayerstartcvars()
        else if (s == "all" || s == "1")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "All Weapons";
+               g_weaponarena_list = "All Weapons Arena";
                g_weaponarena_weapons = weapons_all();
        }
        else if (s == "devall")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "Dev All Weapons";
+               g_weaponarena_list = "Dev All Weapons Arena";
                g_weaponarena_weapons = weapons_devall();
        }
        else if (s == "most")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "Most Weapons";
+               g_weaponarena_list = "Most Weapons Arena";
                g_weaponarena_weapons = weapons_most();
        }
        else if (s == "all_available")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "All Available Weapons";
+               g_weaponarena_list = "All Available Weapons Arena";
 
                // this needs to run after weaponsInMapAll is initialized
                InitializeEntity(NULL, weaponarena_available_all_update, INITPRIO_FINDTARGET);
@@ -1910,7 +1910,7 @@ void readplayerstartcvars()
        else if (s == "devall_available")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "Dev All Available Weapons";
+               g_weaponarena_list = "Dev All Available Weapons Arena";
 
                // this needs to run after weaponsInMapAll is initialized
                InitializeEntity(NULL, weaponarena_available_devall_update, INITPRIO_FINDTARGET);
@@ -1918,7 +1918,7 @@ void readplayerstartcvars()
        else if (s == "most_available")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "Most Available Weapons";
+               g_weaponarena_list = "Most Available Weapons Arena";
 
                // this needs to run after weaponsInMapAll is initialized
                InitializeEntity(NULL, weaponarena_available_most_update, INITPRIO_FINDTARGET);
@@ -1926,7 +1926,7 @@ void readplayerstartcvars()
        else if (s == "none")
        {
                g_weaponarena = 1;
-               g_weaponarena_list = "No Weapons";
+               g_weaponarena_list = "No Weapons Arena";
        }
        else
        {
@@ -1940,10 +1940,13 @@ void readplayerstartcvars()
                        if(wep != WEP_Null)
                        {
                                g_weaponarena_weapons |= (wep.m_wepset);
-                               g_weaponarena_list = strcat(g_weaponarena_list, wep.m_name, " & ");
+                               g_weaponarena_list = strcat(g_weaponarena_list, wep.netname, " & ");
                        }
                }
-               g_weaponarena_list = strzone(substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3));
+               if (g_weaponarena_list != "") // remove trailing " & "
+                       g_weaponarena_list = substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3);
+               else // no valid weapon found
+                       g_weaponarena_list = "No Weapons Arena";
        }
 
        if (g_weaponarena)
@@ -1951,6 +1954,7 @@ void readplayerstartcvars()
                g_weapon_stay = 0; // incompatible
                start_weapons = g_weaponarena_weapons;
                start_items |= IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS;
+               g_weaponarena_list = strzone(g_weaponarena_list);
        }
        else
        {