From 1e5f1418e192f905fa9ed88450b46cbdf81bbcff Mon Sep 17 00:00:00 2001 From: Ashnal Date: Wed, 19 Aug 2020 23:10:53 -0400 Subject: [PATCH] Isolate G_BeginRecording in P_SetupLevel to only dedicated servers Everything else goes back to doing it in Got_Mapcmd --- src/d_netcmd.c | 4 ++-- src/m_menu.c | 4 ---- src/p_setup.c | 3 ++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index a431595be..54a831dbb 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2667,8 +2667,8 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum) if (metalrecording) G_BeginMetal(); - //if (demo.recording) // Okay, level loaded, character spawned and skinned, - // G_BeginRecording(); // I AM NOW READY TO RECORD. + if (demo.recording) // Okay, level loaded, character spawned and skinned, + G_BeginRecording(); // I AM NOW READY TO RECORD. demo.deferstart = true; } diff --git a/src/m_menu.c b/src/m_menu.c index 579175e1e..e08a53c56 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7966,7 +7966,6 @@ static void M_ChooseTimeAttack(INT32 choice) I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755); I_mkdir(va("%s"PATHSEP"replay"PATHSEP"%s", srb2home, timeattackfolder), 0755); - if ((gpath = malloc(glen)) == NULL) I_Error("Out of memory for replay filepath\n"); @@ -7976,10 +7975,7 @@ static void M_ChooseTimeAttack(INT32 choice) if (!cv_autorecord.value) remove(va("%s"PATHSEP"%s.lmp", srb2home, nameofdemo)); else - { G_RecordDemo(nameofdemo); - G_BeginRecording(); - } G_DeferedInitNew(false, G_BuildMapName(cv_nextmap.value), (UINT8)(cv_chooseskin.value-1), 0, false); } diff --git a/src/p_setup.c b/src/p_setup.c index 09b61f3e8..be73a2cd7 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3243,7 +3243,8 @@ boolean P_SetupLevel(boolean skipprecip) I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755); I_mkdir(va("%s"PATHSEP"replay"PATHSEP"online", srb2home), 0755); G_RecordDemo(buf); - G_BeginRecording(); //this has to move here, since dedicated servers dont run got_mapcmd + if (dedicated) + G_BeginRecording(); //this has to move here, since dedicated servers dont run got_mapcmd } // ===========