about summary refs log tree commit diff
path: root/src/game/client/components/particles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/particles.cpp')
-rw-r--r--src/game/client/components/particles.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp
index 99c2c721..c12231ca 100644
--- a/src/game/client/components/particles.cpp
+++ b/src/game/client/components/particles.cpp
@@ -1,5 +1,6 @@
 #include <base/math.h>
 #include <engine/graphics.h>
+#include <engine/demo.h>
 
 #include <game/generated/client_data.h>
 #include <game/client/render.h>
@@ -120,7 +121,16 @@ void CParticles::OnRender()
 {
 	static int64 LastTime = 0;
 	int64 t = time_get();
-	Update((float)((t-LastTime)/(double)time_freq()));
+	
+	if(Client()->State() == IClient::STATE_DEMOPLAYBACK)
+	{
+		const IDemoPlayer::CInfo *pInfo = DemoPlayer()->BaseInfo();		
+		if(!pInfo->m_Paused)
+			Update((float)((t-LastTime)/(double)time_freq())*pInfo->m_Speed);
+	}
+	else
+		Update((float)((t-LastTime)/(double)time_freq()));
+	
 	LastTime = t;
 }