diff options
Diffstat (limited to 'src/game/client/components/effects.cpp')
| -rw-r--r-- | src/game/client/components/effects.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game/client/components/effects.cpp b/src/game/client/components/effects.cpp index 91cea107..b95d66e0 100644 --- a/src/game/client/components/effects.cpp +++ b/src/game/client/components/effects.cpp @@ -1,3 +1,5 @@ +#include <engine/demo.h> + #include <game/generated/client_data.h> #include <game/client/components/particles.h> @@ -238,6 +240,32 @@ void CEffects::OnRender() static int64 LastUpdate100hz = 0; static int64 LastUpdate50hz = 0; + if(Client()->State() == IClient::STATE_DEMOPLAYBACK) + { + const IDemoPlayer::CInfo *pInfo = DemoPlayer()->BaseInfo(); + + if(time_get()-LastUpdate100hz > time_freq()/(100*pInfo->m_Speed)) + { + m_Add100hz = true; + LastUpdate100hz = time_get(); + } + else + m_Add100hz = false; + + if(time_get()-LastUpdate50hz > time_freq()/(100*pInfo->m_Speed)) + { + m_Add50hz = true; + LastUpdate50hz = time_get(); + } + else + m_Add50hz = false; + + if(m_Add50hz) + m_pClient->m_pFlow->Update(); + + return; + } + if(time_get()-LastUpdate100hz > time_freq()/100) { m_Add100hz = true; |