]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't override title and description if none was provided by the map
authorMario <mario.mario@y7mail.com>
Tue, 14 Jul 2020 18:25:05 +0000 (04:25 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 14 Jul 2020 18:25:05 +0000 (04:25 +1000)
qcsrc/common/mapinfo.qc

index cc9c0f93c6145e741af3a47042c1f1a9527342b6..4e91ba1d983520c23bfc9ba8d144982909f8016d 100644 (file)
@@ -799,13 +799,15 @@ bool _MapInfo_ParseArena(int fh, string pFilename, Gametype pGametypeToSet, bool
                        testing_map = false;
                        if(dosave)
                        {
-                               MapInfo_Map_description = stored_Map_description;
-                               MapInfo_Map_title = stored_Map_title;
+                               if(stored_Map_description != "")
+                                       MapInfo_Map_description = stored_Map_description;
+                               if(stored_Map_title != "")
+                                       MapInfo_Map_title = stored_Map_title;
                                FOREACH(Gametypes, it.m_flags & stored_supportedGametypes,
                                {
                                        _MapInfo_Map_ApplyGametype ("", pGametypeToSet, it, true);
                                });
-                               break; // no need to continue through the file, we have our map!
+                               return true; // no need to continue through the file, we have our map!
                        }
                        else
                        {