+/*
+=====================
+CL_NextDemo
+
+Called to play the next demo in the demo loop
+=====================
+*/
+void CL_NextDemo (void)
+{
+ char str[1024];
+
+ if (cls.demonum == -1)
+ return; // don't play demos
+
+ if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS)
+ {
+ cls.demonum = 0;
+ if (!cls.demos[cls.demonum][0])
+ {
+ Con_Printf ("No demos listed with startdemos\n");
+ cls.demonum = -1;
+ return;
+ }
+ }
+
+ sprintf (str,"playdemo %s\n", cls.demos[cls.demonum]);
+ Cbuf_InsertText (str);
+ cls.demonum++;
+}
+