about summary refs log tree commit diff
path: root/src/engine/client/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client/client.cpp')
-rw-r--r--src/engine/client/client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index b9ab18af..26cd5795 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -1279,6 +1279,7 @@ void CClient::ProcessPacket(CNetChunk *pPacket)
 							m_aSnapshots[SNAP_CURRENT] = m_SnapshotStorage.m_pLast;
 							m_LocalStartTime = time_get();
 							SetState(IClient::STATE_ONLINE);
+							DemoRecorder_HandleAutoStart();
 						}
 
 						// adjust game time
@@ -1945,6 +1946,12 @@ void CClient::DemoRecorder_Start(const char *pFilename, bool WithTimestamp)
 	}
 }
 
+void CClient::DemoRecorder_HandleAutoStart()
+{
+	if(g_Config.m_ClAutoDemoRecord)
+		DemoRecorder_Start("autorecord", true);
+}
+
 void CClient::DemoRecorder_Stop()
 {
 	m_DemoRecorder.Stop();