Skip to content

Commit

Permalink
client: render: backported minor changes in Aurora particles from XashXT
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Jan 5, 2025
1 parent a33d368 commit 661befa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client/render/gl_aurora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void UTIL_CreateAurora( cl_entity_t *ent, const char *file, int attachment, floa

// verify file exists
// g-cont. idea! use COMPARE_FILE_TIME instead of LOAD_FILE
if( COMPARE_FILE_TIME( file, file, &iCompare ))
if( !g_fRenderInitialized || COMPARE_FILE_TIME( file, file, &iCompare ))
{
CParticleSystem *pSystem = new CParticleSystem( ent, file, attachment, lifetime );
g_pParticleSystems.AddSystem( pSystem );
Expand Down Expand Up @@ -823,10 +823,10 @@ AURSTATE CParticleSystem :: UpdateSystem( float frametime )

// check for contents to remove
if( m_iKillCondition == POINT_CONTENTS( m_pEntity->origin ))
{
{
m_pEntity = NULL;
enable = false;
}
enable = false;
}
}
else
{
Expand Down Expand Up @@ -1047,6 +1047,10 @@ bool CParticleSystem :: UpdateParticle( CParticle *part, float frametime )
part->m_fBlue += part->m_fBlueStep * frametime;
part->frame += part->m_fFrameStep * frametime;

if (!part->m_pEntity && (part->m_fSize <= 0.0f || part->m_fAlpha <= 0.0f)) {
return false;
}

if( part->m_fAngleStep )
{
part->m_fAngle += part->m_fAngleStep * frametime;
Expand Down

0 comments on commit 661befa

Please sign in to comment.