diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 9e12c3ac9..f9b01cca5 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1187,7 +1187,10 @@ void CL_Disconnect (void) #ifndef CLIENTONLY if (!isDedicated) #endif + { SCR_EndLoadingPlaque(); + V_ClearCShifts(); + } cls.protocol = CP_UNKNOWN; cl.servercount = 0; diff --git a/engine/client/client.h b/engine/client/client.h index db25d5021..b757ced38 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -829,7 +829,6 @@ void V_StartPitchDrift (int pnum); void V_StopPitchDrift (int pnum); void V_RenderView (void); -void V_UpdatePalette (void); void V_Register (void); void V_ParseDamage (int pnum); void V_SetContentsColor (int contents); diff --git a/engine/client/view.c b/engine/client/view.c index ab784ccfb..95dad2689 100644 --- a/engine/client/view.c +++ b/engine/client/view.c @@ -370,7 +370,7 @@ void SWV_Gamma_Callback(struct cvar_s *var, char *oldvalue) { BuildGammaTable (v_gamma.value, v_contrast.value); vid.recalc_refdef = 1; // force a surface cache flush - SWV_UpdatePalette (true); + SWV_UpdatePalette (true, 0); } #endif @@ -379,7 +379,7 @@ void GLV_Gamma_Callback(struct cvar_s *var, char *oldvalue) { BuildGammaTable (v_gamma.value, v_contrast.value); vid.recalc_refdef = 1; // force a surface cache flush - GLV_UpdatePalette (true); + GLV_UpdatePalette (true, 0); } #endif @@ -691,7 +691,7 @@ void GLV_CalcBlend (void) V_UpdatePalette ============= */ -void GLV_UpdatePalette (qboolean force) +void GLV_UpdatePalette (qboolean force, double ftime) { // qboolean ogw; int i, j; @@ -705,16 +705,6 @@ void GLV_UpdatePalette (qboolean force) V_CalcPowerupCshift (); -// drop the damage value - cl.cshifts[CSHIFT_DAMAGE].percent -= host_frametime*150; - if (cl.cshifts[CSHIFT_DAMAGE].percent <= 0) - cl.cshifts[CSHIFT_DAMAGE].percent = 0; - -// drop the bonus value - cl.cshifts[CSHIFT_BONUS].percent -= host_frametime*100; - if (cl.cshifts[CSHIFT_BONUS].percent <= 0) - cl.cshifts[CSHIFT_BONUS].percent = 0; - update = false; for (i=0 ; ifiles; diff --git a/engine/sw/sw_screen.c b/engine/sw/sw_screen.c index e0db553ca..e000c4e2f 100644 --- a/engine/sw/sw_screen.c +++ b/engine/sw/sw_screen.c @@ -89,7 +89,7 @@ void SWSCR_UpdateScreen (void) if (editormodal) { Editor_Draw(); - SWV_UpdatePalette (false); + SWV_UpdatePalette (false, host_frametime); vrect.x = 0; vrect.y = 0; @@ -103,7 +103,7 @@ void SWSCR_UpdateScreen (void) #endif if (Media_ShowFilm()) { - SWV_UpdatePalette (false); + SWV_UpdatePalette (false, host_frametime); vrect.x = 0; vrect.y = 0; @@ -159,7 +159,7 @@ void SWSCR_UpdateScreen (void) D_DisableBackBufferAccess (); // for adapters that can't stay mapped in // for linear writes all the time - SWV_UpdatePalette (false); + SWV_UpdatePalette (false, host_frametime); // // update one of three areas