|
|
@ -608,7 +608,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime ) |
|
|
|
if( pnew ) |
|
|
|
if( pnew ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
VectorCopy( pbeam->source, pnew->org ); |
|
|
|
VectorCopy( pbeam->source, pnew->org ); |
|
|
|
pnew->die = gpGlobals->time + pbeam->amplitude; |
|
|
|
pnew->die = gp_cl->time + pbeam->amplitude; |
|
|
|
VectorClear( pnew->vel ); |
|
|
|
VectorClear( pnew->vel ); |
|
|
|
|
|
|
|
|
|
|
|
pnew->next = particles; |
|
|
|
pnew->next = particles; |
|
|
@ -655,7 +655,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime ) |
|
|
|
VectorMA( delta, -pbeam->width, normal, last2 ); |
|
|
|
VectorMA( delta, -pbeam->width, normal, last2 ); |
|
|
|
|
|
|
|
|
|
|
|
div = 1.0f / pbeam->amplitude; |
|
|
|
div = 1.0f / pbeam->amplitude; |
|
|
|
fraction = ( pbeam->die - gpGlobals->time ) * div; |
|
|
|
fraction = ( pbeam->die - gp_cl->time ) * div; |
|
|
|
|
|
|
|
|
|
|
|
vLast = 0.0f; |
|
|
|
vLast = 0.0f; |
|
|
|
vStep = 1.0f; |
|
|
|
vStep = 1.0f; |
|
|
@ -688,7 +688,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime ) |
|
|
|
|
|
|
|
|
|
|
|
if( particles->next != NULL ) |
|
|
|
if( particles->next != NULL ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fraction = (particles->die - gpGlobals->time) * div; |
|
|
|
fraction = (particles->die - gp_cl->time) * div; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -916,7 +916,7 @@ qboolean R_BeamRecomputeEndpoints( BEAM *pbeam ) |
|
|
|
else if( !FBitSet( pbeam->flags, FBEAM_FOREVER )) |
|
|
|
else if( !FBitSet( pbeam->flags, FBEAM_FOREVER )) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ClearBits( pbeam->flags, FBEAM_ENDENTITY ); |
|
|
|
ClearBits( pbeam->flags, FBEAM_ENDENTITY ); |
|
|
|
pbeam->die = gpGlobals->time; |
|
|
|
pbeam->die = gp_cl->time; |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
@ -949,7 +949,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime ) |
|
|
|
if( !model || model->type != mod_sprite ) |
|
|
|
if( !model || model->type != mod_sprite ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pbeam->flags &= ~FBEAM_ISACTIVE; // force to ignore
|
|
|
|
pbeam->flags &= ~FBEAM_ISACTIVE; // force to ignore
|
|
|
|
pbeam->die = gpGlobals->time; |
|
|
|
pbeam->die = gp_cl->time; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1007,7 +1007,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime ) |
|
|
|
if( pbeam->flags & ( FBEAM_FADEIN|FBEAM_FADEOUT )) |
|
|
|
if( pbeam->flags & ( FBEAM_FADEIN|FBEAM_FADEOUT )) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// update life cycle
|
|
|
|
// update life cycle
|
|
|
|
pbeam->t = pbeam->freq + ( pbeam->die - gpGlobals->time ); |
|
|
|
pbeam->t = pbeam->freq + ( pbeam->die - gp_cl->time ); |
|
|
|
if( pbeam->t != 0.0f ) pbeam->t = 1.0f - pbeam->freq / pbeam->t; |
|
|
|
if( pbeam->t != 0.0f ) pbeam->t = 1.0f - pbeam->freq / pbeam->t; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1055,7 +1055,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime ) |
|
|
|
|
|
|
|
|
|
|
|
TriRenderMode( FBitSet( pbeam->flags, FBEAM_SOLID ) ? kRenderNormal : kRenderTransAdd ); |
|
|
|
TriRenderMode( FBitSet( pbeam->flags, FBEAM_SOLID ) ? kRenderNormal : kRenderTransAdd ); |
|
|
|
|
|
|
|
|
|
|
|
if( !TriSpriteTexture( model, (int)(pbeam->frame + pbeam->frameRate * gpGlobals->time) % pbeam->frameCount )) |
|
|
|
if( !TriSpriteTexture( model, (int)(pbeam->frame + pbeam->frameRate * gp_cl->time) % pbeam->frameCount )) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ClearBits( pbeam->flags, FBEAM_ISACTIVE ); |
|
|
|
ClearBits( pbeam->flags, FBEAM_ISACTIVE ); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -1160,8 +1160,8 @@ static void R_BeamSetup( BEAM *pbeam, vec3_t start, vec3_t end, int modelIndex, |
|
|
|
VectorCopy( end, pbeam->target ); |
|
|
|
VectorCopy( end, pbeam->target ); |
|
|
|
VectorSubtract( end, start, pbeam->delta ); |
|
|
|
VectorSubtract( end, start, pbeam->delta ); |
|
|
|
|
|
|
|
|
|
|
|
pbeam->freq = speed * gpGlobals->time; |
|
|
|
pbeam->freq = speed * gp_cl->time; |
|
|
|
pbeam->die = life + gpGlobals->time; |
|
|
|
pbeam->die = life + gp_cl->time; |
|
|
|
pbeam->amplitude = amplitude; |
|
|
|
pbeam->amplitude = amplitude; |
|
|
|
pbeam->brightness = brightness; |
|
|
|
pbeam->brightness = brightness; |
|
|
|
pbeam->width = width; |
|
|
|
pbeam->width = width; |
|
|
@ -1291,7 +1291,7 @@ void CL_DrawBeams( int fTrans, BEAM *active_beams ) |
|
|
|
if( !fTrans && !FBitSet( pBeam->flags, FBEAM_SOLID )) |
|
|
|
if( !fTrans && !FBitSet( pBeam->flags, FBEAM_SOLID )) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
R_BeamDraw( pBeam, gpGlobals->time - gpGlobals->oldtime ); |
|
|
|
R_BeamDraw( pBeam, gp_cl->time - gp_cl->oldtime ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pglShadeModel( GL_FLAT ); |
|
|
|
pglShadeModel( GL_FLAT ); |
|
|
|