]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add partial support for the cd loop parameter in legacy map's .cfg files, allows...
authorMario <mario@smbclan.net>
Sat, 10 Aug 2019 16:44:23 +0000 (02:44 +1000)
committerMario <mario@smbclan.net>
Sat, 10 Aug 2019 16:44:23 +0000 (02:44 +1000)
qcsrc/server/g_world.qc

index 79b7d971b73e4d7231f5ba3592b415b1b43dd5cc..8680b83a58b596665d6052d2003f3317310a8aab 100644 (file)
@@ -860,8 +860,14 @@ spawnfunc(worldspawn)
                                        continue;
                                if(argv(0) == "cd")
                                {
+                                       string trackname = argv(2);
                                        LOG_INFO("Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:");
-                                       LOG_INFO("  cdtrack ", argv(2));
+                                       LOG_INFO("  cdtrack ", trackname);
+                                       if (cvar_value_issafe(trackname))
+                                       {
+                                               string newstuff = strcat(clientstuff, "cd loop \"", trackname, "\"\n");
+                                               strcpy(clientstuff, newstuff);
+                                       }
                                }
                                else if(argv(0) == "fog")
                                {