From 8ef0a51c5a961ae83c19d71c8bd3398d958fa499 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Mon, 22 Jun 2020 15:31:55 +0000 Subject: [PATCH] (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 --- cl_demo.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++ cl_main.c | 23 ++---------- client.h | 2 ++ host_cmd.c | 81 ----------------------------------------- 4 files changed, 107 insertions(+), 102 deletions(-) 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