about summary refs log tree commit diff
path: root/src/engine/shared/demo.h
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-12-08 00:48:02 +0100
committeroy <Tom_Adams@web.de>2010-12-08 00:48:02 +0100
commit974a40913d5c0cf9516f62ea88df9ecdff7bc3c9 (patch)
treeb6410e9985c872b4d53987387e0dce8e2d4e61b8 /src/engine/shared/demo.h
parentdb9dd6b8c9597ebb59030c54c9bb6f05707e2396 (diff)
downloadzcatch-974a40913d5c0cf9516f62ea88df9ecdff7bc3c9.tar.gz
zcatch-974a40913d5c0cf9516f62ea88df9ecdff7bc3c9.zip
added CDemoRecorder::TickCount() to get demo length by Batchyx
Diffstat (limited to 'src/engine/shared/demo.h')
-rw-r--r--src/engine/shared/demo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/engine/shared/demo.h b/src/engine/shared/demo.h
index 79b0021a..d8ce70b2 100644
--- a/src/engine/shared/demo.h
+++ b/src/engine/shared/demo.h
@@ -22,6 +22,7 @@ class CDemoRecorder : public IDemoRecorder
 	IOHANDLE m_File;
 	int m_LastTickMarker;
 	int m_LastKeyFrame;
+	int m_FirstTick;
 	unsigned char m_aLastSnapshotData[CSnapshot::MAX_SIZE];
 	class CSnapshotDelta *m_pSnapshotDelta;
 	
@@ -37,6 +38,8 @@ public:
 	void RecordMessage(const void *pData, int Size);
 
 	bool IsRecording() const { return m_File != 0; }
+
+	int TickCount() const { return m_LastTickMarker - m_FirstTick; }
 };
 
 class CDemoPlayer : public IDemoPlayer