Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Crash: Creating bugbait at particle limit #560

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion mp/src/game/client/c_smoke_trail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,10 @@ void C_SporeExplosion::OnDataChanged( DataUpdateType_t updateType )
m_teParticleSpawn.Init( m_flSpawnRate );
}

m_pSporeEffect->SetDontRemove( m_bDontRemove );
if( m_pSporeEffect.IsValid() )
{
m_pSporeEffect->SetDontRemove( m_bDontRemove );
}
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -981,6 +984,11 @@ void C_SporeExplosion::Start( CParticleMgr *pParticleMgr, IPrototypeArgAccess *p
//-----------------------------------------------------------------------------
void C_SporeExplosion::AddParticles( void )
{
if( !m_pSporeEffect )
{
return;
}

//Spores
Vector offset;
Vector dir;
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/client/c_smoke_trail.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class C_SporeExplosion : public C_BaseParticleEntity, public IPrototypeAppEffect
PMaterialHandle m_hMaterial;
TimedEvent m_teParticleSpawn;

SporeEffect *m_pSporeEffect;
CSmartPtr<SporeEffect> m_pSporeEffect;
CParticleMgr *m_pParticleMgr;
};

Expand Down
10 changes: 9 additions & 1 deletion sp/src/game/client/c_smoke_trail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,10 @@ void C_SporeExplosion::OnDataChanged( DataUpdateType_t updateType )
m_teParticleSpawn.Init( m_flSpawnRate );
}

m_pSporeEffect->SetDontRemove( m_bDontRemove );
if( m_pSporeEffect.IsValid() )
{
m_pSporeEffect->SetDontRemove( m_bDontRemove );
}
}

//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -981,6 +984,11 @@ void C_SporeExplosion::Start( CParticleMgr *pParticleMgr, IPrototypeArgAccess *p
//-----------------------------------------------------------------------------
void C_SporeExplosion::AddParticles( void )
{
if( !m_pSporeEffect )
{
return;
}

//Spores
Vector offset;
Vector dir;
Expand Down
2 changes: 1 addition & 1 deletion sp/src/game/client/c_smoke_trail.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class C_SporeExplosion : public C_BaseParticleEntity, public IPrototypeAppEffect
PMaterialHandle m_hMaterial;
TimedEvent m_teParticleSpawn;

SporeEffect *m_pSporeEffect;
CSmartPtr<SporeEffect> m_pSporeEffect;
CParticleMgr *m_pParticleMgr;
};

Expand Down