mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed possible client crash with extra projectiles on disconnect
This commit is contained in:
parent
dce5222f78
commit
b5510d4cf9
|
@ -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++)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue