about summary refs log tree commit diff
path: root/src/engine/client/client.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-12-08 01:42:32 +0100
committeroy <Tom_Adams@web.de>2010-12-08 01:42:32 +0100
commit0fe8cabe78da649187c8cf11d5d2746ab4bb20ac (patch)
treeb89b23da82953d162218b47f0d7c754a5b25e000 /src/engine/client/client.cpp
parent974a40913d5c0cf9516f62ea88df9ecdff7bc3c9 (diff)
downloadzcatch-0fe8cabe78da649187c8cf11d5d2746ab4bb20ac.tar.gz
zcatch-0fe8cabe78da649187c8cf11d5d2746ab4bb20ac.zip
added auto recording support by Batchyx
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();