From: Mario Date: Sat, 10 Aug 2019 16:44:23 +0000 (+1000) Subject: Add partial support for the cd loop parameter in legacy map's .cfg files, allows... X-Git-Tag: xonotic-v0.8.5~1417 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=26fc34bcd41928d52dbfa823130dd577ed245462;p=xonotic%2Fxonotic-data.pk3dir.git Add partial support for the cd loop parameter in legacy map's .cfg files, allows music to work on Nexuiz maps --- diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 79b7d971b..8680b83a5 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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") {