Once again improving Demo Interpolation code, regarding changes from rev993, reducing Viewport flicker and jitter
This commit is contained in:
parent
8c2a404085
commit
ca2c80ce4b
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20100126
|
||||
--------
|
||||
main/newdemo.c: Once again improving Demo Interpolation code, regarding changes from rev993, reducing Viewport flicker and jitter
|
||||
|
||||
20100124
|
||||
--------
|
||||
main/gauges.c: Rewrote code for showing Cloak-effect on Cockpit and Statusbar, because it became bugged with changed order of function calls do_cloaked_stuff() and render_gauges()
|
||||
|
|
|
@ -2745,12 +2745,6 @@ void interpolate_frame(fix d_play, fix d_recorded)
|
|||
object *cur_objs;
|
||||
static fix InterpolStep = fl2f(.01);
|
||||
|
||||
InterpolStep -= FrameTime;
|
||||
// This interpolating looks just more crappy on high FPS, so let's not even waste performance on it.
|
||||
if (InterpolStep >= 0)
|
||||
return;
|
||||
InterpolStep = fl2f(.01);
|
||||
|
||||
factor = fixdiv(d_play, d_recorded);
|
||||
if (factor > F1_0)
|
||||
factor = F1_0;
|
||||
|
@ -2771,6 +2765,11 @@ void interpolate_frame(fix d_play, fix d_recorded)
|
|||
return;
|
||||
}
|
||||
|
||||
InterpolStep -= FrameTime;
|
||||
|
||||
// This interpolating looks just more crappy on high FPS, so let's not even waste performance on it.
|
||||
if (InterpolStep <= 0)
|
||||
{
|
||||
for (i = 0; i <= num_cur_objs; i++) {
|
||||
for (j = 0; j <= Highest_object_index; j++) {
|
||||
if (cur_objs[i].signature == Objects[j].signature) {
|
||||
|
@ -2828,6 +2827,8 @@ void interpolate_frame(fix d_play, fix d_recorded)
|
|||
}
|
||||
}
|
||||
}
|
||||
InterpolStep = fl2f(.01);
|
||||
}
|
||||
|
||||
// get back to original position in the demo file. Reread the current
|
||||
// frame information again to reset all of the object stuff not covered
|
||||
|
|
Loading…
Reference in a new issue