|
|
@ -441,8 +441,8 @@ void R_SetupFrustum( void ) |
|
|
|
|
|
|
|
|
|
|
|
/*if( RP_NORMALPASS() && ( ENGINE_GET_PARM( PARM_WATER_LEVEL ) >= 3 ) && ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ))
|
|
|
|
/*if( RP_NORMALPASS() && ( ENGINE_GET_PARM( PARM_WATER_LEVEL ) >= 3 ) && ENGINE_GET_PARM( PARM_QUAKE_COMPATIBLE ))
|
|
|
|
{ |
|
|
|
{ |
|
|
|
RI.fov_x = atan( tan( DEG2RAD( RI.fov_x ) / 2 ) * ( 0.97 + sin( gpGlobals->time * 1.5 ) * 0.03 )) * 2 / (M_PI / 180.0); |
|
|
|
RI.fov_x = atan( tan( DEG2RAD( RI.fov_x ) / 2 ) * ( 0.97 + sin( gp_cl->time * 1.5 ) * 0.03 )) * 2 / (M_PI / 180.0); |
|
|
|
RI.fov_y = atan( tan( DEG2RAD( RI.fov_y ) / 2 ) * ( 1.03 - sin( gpGlobals->time * 1.5 ) * 0.03 )) * 2 / (M_PI / 180.0); |
|
|
|
RI.fov_y = atan( tan( DEG2RAD( RI.fov_y ) / 2 ) * ( 1.03 - sin( gp_cl->time * 1.5 ) * 0.03 )) * 2 / (M_PI / 180.0); |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
// build the transformation matrix for the given view angles
|
|
|
|
// build the transformation matrix for the given view angles
|
|
|
@ -1171,7 +1171,7 @@ void R_DrawBEntitiesOnList (void) |
|
|
|
dlight_t *l = gEngfuncs.GetDynamicLight( k ); |
|
|
|
dlight_t *l = gEngfuncs.GetDynamicLight( k ); |
|
|
|
vec3_t origin_l, oldorigin; |
|
|
|
vec3_t origin_l, oldorigin; |
|
|
|
|
|
|
|
|
|
|
|
if( l->die < gpGlobals->time || !l->radius ) |
|
|
|
if( l->die < gp_cl->time || !l->radius ) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
VectorCopy( l->origin, oldorigin ); // save lightorigin
|
|
|
|
VectorCopy( l->origin, oldorigin ); // save lightorigin
|
|
|
@ -1326,7 +1326,7 @@ void R_DrawBrushModel(cl_entity_t *pent) |
|
|
|
dlight_t *l = gEngfuncs.GetDynamicLight( k ); |
|
|
|
dlight_t *l = gEngfuncs.GetDynamicLight( k ); |
|
|
|
vec3_t origin_l, oldorigin; |
|
|
|
vec3_t origin_l, oldorigin; |
|
|
|
|
|
|
|
|
|
|
|
if( l->die < gpGlobals->time || !l->radius ) |
|
|
|
if( l->die < gp_cl->time || !l->radius ) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
VectorCopy( l->origin, oldorigin ); // save lightorigin
|
|
|
|
VectorCopy( l->origin, oldorigin ); // save lightorigin
|
|
|
@ -1561,7 +1561,7 @@ void GAME_EXPORT R_RenderScene( void ) |
|
|
|
|
|
|
|
|
|
|
|
// frametime is valid only for normal pass
|
|
|
|
// frametime is valid only for normal pass
|
|
|
|
if( RP_NORMALPASS( )) |
|
|
|
if( RP_NORMALPASS( )) |
|
|
|
tr.frametime = gpGlobals->time - gpGlobals->oldtime; |
|
|
|
tr.frametime = gp_cl->time - gp_cl->oldtime; |
|
|
|
else tr.frametime = 0.0; |
|
|
|
else tr.frametime = 0.0; |
|
|
|
|
|
|
|
|
|
|
|
// begin a new frame
|
|
|
|
// begin a new frame
|
|
|
@ -1984,16 +1984,16 @@ int CL_FxBlend( cl_entity_t *e ) |
|
|
|
switch( e->curstate.renderfx ) |
|
|
|
switch( e->curstate.renderfx ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case kRenderFxPulseSlowWide: |
|
|
|
case kRenderFxPulseSlowWide: |
|
|
|
blend = e->curstate.renderamt + 0x40 * sin( gpGlobals->time * 2 + offset ); |
|
|
|
blend = e->curstate.renderamt + 0x40 * sin( gp_cl->time * 2 + offset ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxPulseFastWide: |
|
|
|
case kRenderFxPulseFastWide: |
|
|
|
blend = e->curstate.renderamt + 0x40 * sin( gpGlobals->time * 8 + offset ); |
|
|
|
blend = e->curstate.renderamt + 0x40 * sin( gp_cl->time * 8 + offset ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxPulseSlow: |
|
|
|
case kRenderFxPulseSlow: |
|
|
|
blend = e->curstate.renderamt + 0x10 * sin( gpGlobals->time * 2 + offset ); |
|
|
|
blend = e->curstate.renderamt + 0x10 * sin( gp_cl->time * 2 + offset ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxPulseFast: |
|
|
|
case kRenderFxPulseFast: |
|
|
|
blend = e->curstate.renderamt + 0x10 * sin( gpGlobals->time * 8 + offset ); |
|
|
|
blend = e->curstate.renderamt + 0x10 * sin( gp_cl->time * 8 + offset ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxFadeSlow: |
|
|
|
case kRenderFxFadeSlow: |
|
|
|
if( RP_NORMALPASS( )) |
|
|
|
if( RP_NORMALPASS( )) |
|
|
@ -2032,27 +2032,27 @@ int CL_FxBlend( cl_entity_t *e ) |
|
|
|
blend = e->curstate.renderamt; |
|
|
|
blend = e->curstate.renderamt; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxStrobeSlow: |
|
|
|
case kRenderFxStrobeSlow: |
|
|
|
blend = 20 * sin( gpGlobals->time * 4 + offset ); |
|
|
|
blend = 20 * sin( gp_cl->time * 4 + offset ); |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxStrobeFast: |
|
|
|
case kRenderFxStrobeFast: |
|
|
|
blend = 20 * sin( gpGlobals->time * 16 + offset ); |
|
|
|
blend = 20 * sin( gp_cl->time * 16 + offset ); |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxStrobeFaster: |
|
|
|
case kRenderFxStrobeFaster: |
|
|
|
blend = 20 * sin( gpGlobals->time * 36 + offset ); |
|
|
|
blend = 20 * sin( gp_cl->time * 36 + offset ); |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxFlickerSlow: |
|
|
|
case kRenderFxFlickerSlow: |
|
|
|
blend = 20 * (sin( gpGlobals->time * 2 ) + sin( gpGlobals->time * 17 + offset )); |
|
|
|
blend = 20 * (sin( gp_cl->time * 2 ) + sin( gp_cl->time * 17 + offset )); |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case kRenderFxFlickerFast: |
|
|
|
case kRenderFxFlickerFast: |
|
|
|
blend = 20 * (sin( gpGlobals->time * 16 ) + sin( gpGlobals->time * 23 + offset )); |
|
|
|
blend = 20 * (sin( gp_cl->time * 16 ) + sin( gp_cl->time * 23 + offset )); |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
if( blend < 0 ) blend = 0; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
else blend = e->curstate.renderamt; |
|
|
|
break; |
|
|
|
break; |
|
|
|