mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 20:50:42 +00:00
better fix for the dlights problem (will prevent similar problems in the
future)
This commit is contained in:
parent
88302bd5f0
commit
44943e78de
9 changed files with 7 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue