diff --git a/include/QF/render.h b/include/QF/render.h index 631ebde7b..36ca2379e 100644 --- a/include/QF/render.h +++ b/include/QF/render.h @@ -185,7 +185,7 @@ void R_ClearEnts (void); struct entity_s **R_NewEntity (void); dlight_t *R_AllocDlight (int key); -void R_DecayLights (void); +void R_DecayLights (double frametime); void R_ClearDlights (void); #endif // __render_h diff --git a/nq/source/gl_screen.c b/nq/source/gl_screen.c index bae11343b..cefc493b0 100644 --- a/nq/source/gl_screen.c +++ b/nq/source/gl_screen.c @@ -884,7 +884,6 @@ SCR_UpdateScreen (double realtime) if (block_drawing) return; - r_frametime = min (realtime - r_realtime, 5); // bound to 0.2 fps r_realtime = realtime; vid.numpages = 2 + gl_triplebuffer->int_val; diff --git a/nq/source/host.c b/nq/source/host.c index 044fb4d70..4fa3842ae 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -713,7 +713,7 @@ _Host_Frame (float time) // update audio if (cls.signon == SIGNONS) { S_Update (r_origin, vpn, vright, vup); - R_DecayLights (); + R_DecayLights (host_frametime); } else S_Update (vec3_origin, vec3_origin, vec3_origin, vec3_origin); diff --git a/nq/source/r_main.c b/nq/source/r_main.c index e5be65e55..ac81ed25f 100644 --- a/nq/source/r_main.c +++ b/nq/source/r_main.c @@ -3,7 +3,6 @@ #include "r_local.h" double r_realtime; -double r_frametime; dlight_t r_dlights[MAX_DLIGHTS]; dlight_t * @@ -42,7 +41,7 @@ R_AllocDlight (int key) } void -R_DecayLights (void) +R_DecayLights (double frametime) { int i; dlight_t *dl; @@ -52,7 +51,7 @@ R_DecayLights (void) if (dl->die < r_realtime || !dl->radius) continue; - dl->radius -= r_frametime * dl->decay; + dl->radius -= frametime * dl->decay; if (dl->radius < 0) dl->radius = 0; } diff --git a/nq/source/screen.c b/nq/source/screen.c index 24a770b0b..8e53a8c1f 100644 --- a/nq/source/screen.c +++ b/nq/source/screen.c @@ -893,7 +893,6 @@ SCR_UpdateScreen (double realtime) } #endif - r_frametime = min (realtime - r_realtime, 5); // bound to 0.2 fps r_realtime = realtime; scr_copytop = 0; diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 310734f38..e762c52e0 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -1488,7 +1488,7 @@ Host_Frame (float time) // update audio if (cls.state == ca_active) { S_Update (r_origin, vpn, vright, vup); - R_DecayLights (); + R_DecayLights (host_frametime); } else S_Update (vec3_origin, vec3_origin, vec3_origin, vec3_origin); diff --git a/qw/source/gl_screen.c b/qw/source/gl_screen.c index 0cea06696..fc53d79a0 100644 --- a/qw/source/gl_screen.c +++ b/qw/source/gl_screen.c @@ -882,7 +882,6 @@ SCR_UpdateScreen (double realtime) if (block_drawing) return; - r_frametime = min (realtime - r_realtime, 5); // bound to 0.2 fps r_realtime = realtime; vid.numpages = 2 + gl_triplebuffer->int_val; diff --git a/qw/source/r_main.c b/qw/source/r_main.c index e5be65e55..ac81ed25f 100644 --- a/qw/source/r_main.c +++ b/qw/source/r_main.c @@ -3,7 +3,6 @@ #include "r_local.h" double r_realtime; -double r_frametime; dlight_t r_dlights[MAX_DLIGHTS]; dlight_t * @@ -42,7 +41,7 @@ R_AllocDlight (int key) } void -R_DecayLights (void) +R_DecayLights (double frametime) { int i; dlight_t *dl; @@ -52,7 +51,7 @@ R_DecayLights (void) if (dl->die < r_realtime || !dl->radius) continue; - dl->radius -= r_frametime * dl->decay; + dl->radius -= frametime * dl->decay; if (dl->radius < 0) dl->radius = 0; } diff --git a/qw/source/screen.c b/qw/source/screen.c index 567c6672e..6c08dcd24 100644 --- a/qw/source/screen.c +++ b/qw/source/screen.c @@ -892,7 +892,6 @@ SCR_UpdateScreen (double realtime) } #endif - r_frametime = min (realtime - r_realtime, 5); // bound to 0.2 fps r_realtime = realtime; scr_copytop = 0;