diff options
| author | oy <Tom_Adams@web.de> | 2012-01-10 00:49:31 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2012-01-10 00:49:31 +0100 |
| commit | dfe91338f03534a6c8ed596f16742e7a1617d78e (patch) | |
| tree | 4f2f93488745628c56dbd4d29d8b482dc584a724 /src/game/client/components/particles.cpp | |
| parent | 9251796c3a8e3f31f9aa52ef84b9e0ce475d2f9b (diff) | |
| download | zcatch-dfe91338f03534a6c8ed596f16742e7a1617d78e.tar.gz zcatch-dfe91338f03534a6c8ed596f16742e7a1617d78e.zip | |
added pause command. Closes #15
Diffstat (limited to 'src/game/client/components/particles.cpp')
| -rw-r--r-- | src/game/client/components/particles.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp index c4583cb1..66a62f1c 100644 --- a/src/game/client/components/particles.cpp +++ b/src/game/client/components/particles.cpp @@ -43,6 +43,11 @@ void CParticles::Add(int Group, CParticle *pPart) if(pInfo->m_Paused) return; } + else + { + if(m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED) + return; + } if (m_FirstFree == -1) return; @@ -142,7 +147,10 @@ void CParticles::OnRender() Update((float)((t-LastTime)/(double)time_freq())*pInfo->m_Speed); } else - Update((float)((t-LastTime)/(double)time_freq())); + { + if(m_pClient->m_Snap.m_pGameInfoObj && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED)) + Update((float)((t-LastTime)/(double)time_freq())); + } LastTime = t; } |