From: cloudwalk Date: Mon, 22 Jun 2020 15:31:55 +0000 (+0000) Subject: (Round 2) Break up host_cmd.c X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8ef0a51c5a961ae83c19d71c8bd3398d958fa499;p=xonotic%2Fdarkplaces.git (Round 2) Break up host_cmd.c This time, demo code. Some parts of demo code were littered in cl_main.c as well, and have been moved. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12719 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_demo.c b/cl_demo.c index 137c1577..1d14f718 100644 --- a/cl_demo.c +++ b/cl_demo.c @@ -619,3 +619,106 @@ void CL_TimeDemo_f(cmd_state_t *cmd) cls.demonum = -1; // stop demo loop } +/* +=============================================================================== + +DEMO LOOP CONTROL + +=============================================================================== +*/ + + +/* +================== +CL_Startdemos_f +================== +*/ +static void CL_Startdemos_f(cmd_state_t *cmd) +{ + int i, c; + + if (cls.state == ca_dedicated || COM_CheckParm("-listen") || COM_CheckParm("-benchmark") || COM_CheckParm("-demo") || COM_CheckParm("-capturedemo")) + return; + + c = Cmd_Argc(cmd) - 1; + if (c > MAX_DEMOS) + { + Con_Printf("Max %i demos in demoloop\n", MAX_DEMOS); + c = MAX_DEMOS; + } + Con_DPrintf("%i demo(s) in loop\n", c); + + for (i=1 ; i MAX_DEMOS) - { - Con_Printf("Max %i demos in demoloop\n", MAX_DEMOS); - c = MAX_DEMOS; - } - Con_DPrintf("%i demo(s) in loop\n", c); - - for (i=1 ; i