diff options
| author | oy <Tom_Adams@web.de> | 2010-11-17 00:38:20 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-11-17 00:38:20 +0100 |
| commit | 9ff7500f30172e0de16c43fb6e1661f94d7892e7 (patch) | |
| tree | 95f2ea7e42901c4ccac47757cc3c72526ffcd3f6 /src/game/client | |
| parent | e46cb020896570140df82b452b5ea68ddbbf6518 (diff) | |
| download | zcatch-9ff7500f30172e0de16c43fb6e1661f94d7892e7.tar.gz zcatch-9ff7500f30172e0de16c43fb6e1661f94d7892e7.zip | |
fixed graphic problems with ninja when pausing a demo. Closes #269
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/components/particles.cpp | 7 | ||||
| -rw-r--r-- | src/game/client/components/players.cpp | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp index c12231ca..479ac7ba 100644 --- a/src/game/client/components/particles.cpp +++ b/src/game/client/components/particles.cpp @@ -35,6 +35,13 @@ void CParticles::OnReset() void CParticles::Add(int Group, CParticle *pPart) { + if(Client()->State() == IClient::STATE_DEMOPLAYBACK) + { + const IDemoPlayer::CInfo *pInfo = DemoPlayer()->BaseInfo(); + if(pInfo->m_Paused) + return; + } + if (m_FirstFree == -1) return; diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index bb79f550..90a6b594 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -1,3 +1,4 @@ +#include <engine/demo.h> #include <engine/graphics.h> #include <engine/shared/config.h> #include <game/generated/protocol.h> @@ -417,8 +418,16 @@ void CPlayers::RenderPlayer( if ((Client()->GameTick()-Player.m_AttackTick) <= (SERVER_TICK_SPEED / 6) && g_pData->m_Weapons.m_aId[iw].m_NumSpriteMuzzles) { int IteX = rand() % g_pData->m_Weapons.m_aId[iw].m_NumSpriteMuzzles; - float Alpha = 1.0f; - if (Alpha > 0.0f && g_pData->m_Weapons.m_aId[iw].m_aSpriteMuzzles[IteX]) + if(Client()->State() == IClient::STATE_DEMOPLAYBACK) + { + static int s_LastIteX = IteX; + const IDemoPlayer::CInfo *pInfo = DemoPlayer()->BaseInfo(); + if(pInfo->m_Paused) + IteX = s_LastIteX; + else + s_LastIteX = IteX; + } + if(g_pData->m_Weapons.m_aId[iw].m_aSpriteMuzzles[IteX]) { vec2 Dir = vec2(pPlayerChar->m_X,pPlayerChar->m_Y) - vec2(pPrevChar->m_X, pPrevChar->m_Y); Dir = normalize(Dir); |