]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Display map author in Welcome message, add more author fallback paths
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index 10d18dc3e0515197bb64f1196eec52bd2972d9c2..06e7df4edc9e7af26ec0ef80a4113ffe54bfa5f8 100644 (file)
@@ -1440,6 +1440,7 @@ bool net_handle_ServerWelcome()
        bool version_mismatch = flags & 2;
        bool version_check = flags & 4;
        MapInfo_Map_titlestring = ReadString();
+       MapInfo_Map_author = flags & 8 ? ReadString() : "";
        srv_minplayers = ReadByte();
        srv_maxplayers = ReadByte();
        string modifications = translate_modifications(ReadString());
@@ -1452,6 +1453,8 @@ bool net_handle_ServerWelcome()
        msg = strcat(msg, "\n\n", _("Gametype:"), " ^1", MapInfo_Type_ToText(gametype), "\n");
 
        msg = strcat(msg, "\n", _("Map:"), " ", MapInfo_Map_titlestring, "\n");
+       if (flags & 8)
+               msg = strcat(msg, "^9", _("by:"), " ", MapInfo_Map_author, "\n");
 
        if (srv_minplayers || srv_maxplayers)
        {