diff options
| author | oy <Tom_Adams@web.de> | 2011-04-08 11:22:44 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-08 11:22:44 +0200 |
| commit | b5510d4cf9cabd592043bd8d4ad9c2d3c8864a5d (patch) | |
| tree | 8f57a09190c8d165b4e301a23d91fdbaf024319b /src/game/client/components | |
| parent | dce5222f7854ee35ce056c24ab48fd78d268426b (diff) | |
| download | zcatch-b5510d4cf9cabd592043bd8d4ad9c2d3c8864a5d.tar.gz zcatch-b5510d4cf9cabd592043bd8d4ad9c2d3c8864a5d.zip | |
fixed possible client crash with extra projectiles on disconnect
Diffstat (limited to 'src/game/client/components')
| -rw-r--r-- | src/game/client/components/items.cpp | 3 | ||||
| -rw-r--r-- | src/game/client/components/particles.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/game/client/components/items.cpp b/src/game/client/components/items.cpp index db0b8abd..5eeb3209 100644 --- a/src/game/client/components/items.cpp +++ b/src/game/client/components/items.cpp @@ -266,6 +266,9 @@ void CItems::RenderLaser(const struct CNetObj_Laser *pCurrent) void CItems::OnRender() { + if(Client()->State() < IClient::STATE_ONLINE) + return; + int Num = Client()->SnapNumItems(IClient::SNAP_CURRENT); for(int i = 0; i < Num; i++) { diff --git a/src/game/client/components/particles.cpp b/src/game/client/components/particles.cpp index ba6b13c7..25c9dd36 100644 --- a/src/game/client/components/particles.cpp +++ b/src/game/client/components/particles.cpp @@ -129,6 +129,9 @@ void CParticles::Update(float TimePassed) void CParticles::OnRender() { + if(Client()->State() < IClient::STATE_ONLINE) + return; + static int64 LastTime = 0; int64 t = time_get(); |