fixed possible client crash with extra projectiles on disconnect

This commit is contained in:
oy 2011-04-08 11:22:44 +02:00
parent dce5222f78
commit b5510d4cf9
2 changed files with 6 additions and 0 deletions

View file

@ -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++)
{

View file

@ -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();