From 26fc34bcd41928d52dbfa823130dd577ed245462 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 11 Aug 2019 02:44:23 +1000 Subject: [PATCH] Add partial support for the cd loop parameter in legacy map's .cfg files, allows music to work on Nexuiz maps --- qcsrc/server/g_world.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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") { -- 2.39.2