float bob2_smooth;
float bobfall_speed;
float bobfall_swing;
+ double calcrefdef_prevtime;
// don't change view angle, full screen, etc
int intermission;
* cl.oldongrounbd
* cl.stairsmoothtime
* cl.stairsmoothz
+ * cl.calcrefdef_prevtime
* Extra input:
* cl.movecmd[0].time
* cl.movevars_stepheight
cl.lastongroundtime = cl.movecmd[0].time;
}
cl.oldonground = clonground;
+ cl.calcrefdef_prevtime = max(cl.calcrefdef_prevtime, cl.oldtime);
VectorClear(gunorg);
viewmodelmatrix_nobob = identitymatrix;
// apply the viewofs (even if chasecam is used)
// Samual: Lets add smoothing for this too so that things like crouching are done with a transition.
- viewheight = bound(0, (cl.time - cl.oldtime) / max(0.0001, cl_smoothviewheight.value), 1);
+ viewheight = bound(0, (cl.time - cl.calcrefdef_prevtime) / max(0.0001, cl_smoothviewheight.value), 1);
viewheightavg = viewheightavg * (1 - viewheight) + clstatsviewheight * viewheight;
vieworg[2] += viewheightavg;
float cycle;
vec_t frametime;
- frametime = (cl.time - cl.oldtime) * cl.movevars_timescale;
+ frametime = (cl.time - cl.calcrefdef_prevtime) * cl.movevars_timescale;
// 1. if we teleported, clear the frametime... the lowpass will recover the previous value then
if(teleported)