if (scr_center_lines > scr_erase_lines)
scr_erase_lines = scr_center_lines;
- scr_centertime_off -= cl.realframetime;
+ if (cl.time > cl.oldtime)
+ scr_centertime_off -= cl.time - cl.oldtime;
// don't draw if this is a normal stats-screen intermission,
// only if it is not an intermission, or a finale intermission
// Don't adjust volume too fast
// FIXME: this rounds off to an int each frame, meaning there is little to no fade at extremely high framerates!
- if (chan->master_vol < vol)
+ if (cl.time > cl.oldtime)
{
- chan->master_vol += (int)(cl.realframetime * ambient_fade.value);
- if (chan->master_vol > vol)
- chan->master_vol = vol;
- }
- else if (chan->master_vol > vol)
- {
- chan->master_vol -= (int)(cl.realframetime * ambient_fade.value);
if (chan->master_vol < vol)
- chan->master_vol = vol;
+ {
+ chan->master_vol += (int)((cl.time - cl.oldtime) * ambient_fade.value);
+ if (chan->master_vol > vol)
+ chan->master_vol = vol;
+ }
+ else if (chan->master_vol > vol)
+ {
+ chan->master_vol -= (int)((cl.time - cl.oldtime) * ambient_fade.value);
+ if (chan->master_vol < vol)
+ chan->master_vol = vol;
+ }
}
for (i = 0;i < SND_LISTENERS;i++)