]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Accept multiple arguments for sv_intermission_cdtrack
authorMario <mario@smbclan.net>
Sat, 7 Nov 2015 09:07:46 +0000 (19:07 +1000)
committerMario <mario@smbclan.net>
Sat, 7 Nov 2015 09:07:46 +0000 (19:07 +1000)
qcsrc/server/g_world.qc

index 6f3b56d779fd5c4d952450b8f8e88bc37089d50f..16a78fd6dcbccf8105c41a54ac27df1d31fa2236 100644 (file)
@@ -1459,7 +1459,6 @@ void DumpStats(float final)
 
 void FixIntermissionClient(entity e)
 {
-       string s;
        if(!e.autoscreenshot) // initial call
        {
                e.autoscreenshot = time + 0.8;  // used for autoscreenshot
@@ -1481,9 +1480,11 @@ void FixIntermissionClient(entity e)
                if(IS_REAL_CLIENT(e))
                {
                        stuffcmd(e, "\nscr_printspeed 1000000\n");
-                       s = autocvar_sv_intermission_cdtrack;
-                       if(s != "")
-                               stuffcmd(e, strcat("\ncd loop ", s, "\n"));
+                       string list = autocvar_sv_intermission_cdtrack;
+                       for(string it; (it = car(list)); list = cdr(list))
+                               RandomSelection_Add(world, 0, it, 1, 1);
+                       if(RandomSelection_chosen_string && RandomSelection_chosen_string != "")
+                               stuffcmd(e, strcat("\ncd loop ", RandomSelection_chosen_string, "\n"));
                        msg_entity = e;
                        WriteByte(MSG_ONE, SVC_INTERMISSION);
                }