void CL_StairSmoothing (void)
{
if (v_dmg_time > 0)
- v_dmg_time -= (cl.time - cl.oldtime);
+ v_dmg_time -= bound(0, cl.time - cl.oldtime, 0.1);
// stair smoothing
if (cl.onground && cl.stairoffset < 0)
{
- cl.stairoffset += (cl.time - cl.oldtime) * cl_stairsmoothspeed.value;
+ cl.stairoffset += bound(0, cl.time - cl.oldtime, 0.1) * cl_stairsmoothspeed.value;
cl.stairoffset = bound(-16, cl.stairoffset, 0);
}
else if (cl.onground && cl.stairoffset > 0)
{
- cl.stairoffset -= (cl.time - cl.oldtime) * cl_stairsmoothspeed.value;
+ cl.stairoffset -= bound(0, cl.time - cl.oldtime, 0.1) * cl_stairsmoothspeed.value;
cl.stairoffset = bound(0, cl.stairoffset, 16);
}
else
else
{
r_view.matrix = ent->render.matrix;
- r_view.matrix.m[2][3] += cl.stats[STAT_VIEWHEIGHT];
+ Matrix4x4_AdjustOrigin(&r_view.matrix, 0, 0, cl.stats[STAT_VIEWHEIGHT]);
}
viewmodelmatrix = r_view.matrix;
}
void V_FadeViewFlashs(void)
{
+ // don't flash if time steps backwards
+ if (cl.time <= cl.oldtime)
+ return;
// drop the damage value
cl.cshifts[CSHIFT_DAMAGE].percent -= (cl.time - cl.oldtime)*150;
if (cl.cshifts[CSHIFT_DAMAGE].percent <= 0)