|
|
|
@ -611,7 +611,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime )
@@ -611,7 +611,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime )
|
|
|
|
|
if( pnew ) |
|
|
|
|
{ |
|
|
|
|
VectorCopy( pbeam->source, pnew->org ); |
|
|
|
|
pnew->die = gpGlobals->time + pbeam->amplitude; |
|
|
|
|
pnew->die = gp_cl->time + pbeam->amplitude; |
|
|
|
|
VectorClear( pnew->vel ); |
|
|
|
|
|
|
|
|
|
pnew->next = particles; |
|
|
|
@ -658,7 +658,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime )
@@ -658,7 +658,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime )
|
|
|
|
|
VectorMA( delta, -pbeam->width, normal, last2 ); |
|
|
|
|
|
|
|
|
|
div = 1.0f / pbeam->amplitude; |
|
|
|
|
fraction = ( pbeam->die - gpGlobals->time ) * div; |
|
|
|
|
fraction = ( pbeam->die - gp_cl->time ) * div; |
|
|
|
|
|
|
|
|
|
vLast = 0.0f; |
|
|
|
|
vStep = 1.0f; |
|
|
|
@ -694,7 +694,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime )
@@ -694,7 +694,7 @@ void R_DrawBeamFollow( BEAM *pbeam, float frametime )
|
|
|
|
|
|
|
|
|
|
if( particles->next != NULL ) |
|
|
|
|
{ |
|
|
|
|
fraction = (particles->die - gpGlobals->time) * div; |
|
|
|
|
fraction = (particles->die - gp_cl->time) * div; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -929,7 +929,7 @@ qboolean R_BeamRecomputeEndpoints( BEAM *pbeam )
@@ -929,7 +929,7 @@ qboolean R_BeamRecomputeEndpoints( BEAM *pbeam )
|
|
|
|
|
else if( !FBitSet( pbeam->flags, FBEAM_FOREVER )) |
|
|
|
|
{ |
|
|
|
|
ClearBits( pbeam->flags, FBEAM_ENDENTITY ); |
|
|
|
|
pbeam->die = gpGlobals->time; |
|
|
|
|
pbeam->die = gp_cl->time; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
@ -962,7 +962,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
@@ -962,7 +962,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
|
|
|
|
if( !model || model->type != mod_sprite ) |
|
|
|
|
{ |
|
|
|
|
pbeam->flags &= ~FBEAM_ISACTIVE; // force to ignore
|
|
|
|
|
pbeam->die = gpGlobals->time; |
|
|
|
|
pbeam->die = gp_cl->time; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1020,7 +1020,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
@@ -1020,7 +1020,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
|
|
|
|
if( pbeam->flags & ( FBEAM_FADEIN|FBEAM_FADEOUT )) |
|
|
|
|
{ |
|
|
|
|
// 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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1068,7 +1068,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
@@ -1068,7 +1068,7 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
|
|
|
|
|
|
|
|
|
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 ); |
|
|
|
|
return; |
|
|
|
@ -1173,8 +1173,8 @@ static void R_BeamSetup( BEAM *pbeam, vec3_t start, vec3_t end, int modelIndex,
@@ -1173,8 +1173,8 @@ static void R_BeamSetup( BEAM *pbeam, vec3_t start, vec3_t end, int modelIndex,
|
|
|
|
|
VectorCopy( end, pbeam->target ); |
|
|
|
|
VectorSubtract( end, start, pbeam->delta ); |
|
|
|
|
|
|
|
|
|
pbeam->freq = speed * gpGlobals->time; |
|
|
|
|
pbeam->die = life + gpGlobals->time; |
|
|
|
|
pbeam->freq = speed * gp_cl->time; |
|
|
|
|
pbeam->die = life + gp_cl->time; |
|
|
|
|
pbeam->amplitude = amplitude; |
|
|
|
|
pbeam->brightness = brightness; |
|
|
|
|
pbeam->width = width; |
|
|
|
@ -1304,7 +1304,7 @@ void GAME_EXPORT CL_DrawBeams( int fTrans, BEAM *active_beams )
@@ -1304,7 +1304,7 @@ void GAME_EXPORT CL_DrawBeams( int fTrans, BEAM *active_beams )
|
|
|
|
|
if( !fTrans && !FBitSet( pBeam->flags, FBEAM_SOLID )) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
R_BeamDraw( pBeam, gpGlobals->time - gpGlobals->oldtime ); |
|
|
|
|
R_BeamDraw( pBeam, gp_cl->time - gp_cl->oldtime ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//pglShadeModel( GL_FLAT );
|
|
|
|
|