mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Add R_RelativeTeleportViewInterpolation
Adjusts pview_old for relative teleport to attempt a contigious motion
This commit is contained in:
parent
054bbd7745
commit
2bab452268
3 changed files with 11 additions and 0 deletions
|
@ -2395,6 +2395,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
camera[i].y += y;
|
camera[i].y += y;
|
||||||
camera[i].z += z;
|
camera[i].z += z;
|
||||||
camera[i].subsector = R_PointInSubsector(camera[i].x, camera[i].y);
|
camera[i].subsector = R_PointInSubsector(camera[i].x, camera[i].y);
|
||||||
|
R_RelativeTeleportViewInterpolation(i, x, y, z, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,6 +210,14 @@ void R_ResetViewInterpolation(UINT8 p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff, fixed_t zdiff, angle_t angdiff)
|
||||||
|
{
|
||||||
|
pview_old[p].x += xdiff;
|
||||||
|
pview_old[p].y += ydiff;
|
||||||
|
pview_old[p].z += zdiff;
|
||||||
|
pview_old[p].angle += angdiff;
|
||||||
|
}
|
||||||
|
|
||||||
void R_SetViewContext(enum viewcontext_e _viewcontext)
|
void R_SetViewContext(enum viewcontext_e _viewcontext)
|
||||||
{
|
{
|
||||||
UINT8 i = 0;
|
UINT8 i = 0;
|
||||||
|
|
|
@ -115,6 +115,8 @@ void R_InterpolateView(fixed_t frac);
|
||||||
void R_UpdateViewInterpolation(void);
|
void R_UpdateViewInterpolation(void);
|
||||||
// Reset the view states (e.g. after level load) so R_InterpolateView doesn't interpolate invalid data
|
// Reset the view states (e.g. after level load) so R_InterpolateView doesn't interpolate invalid data
|
||||||
void R_ResetViewInterpolation(UINT8 p);
|
void R_ResetViewInterpolation(UINT8 p);
|
||||||
|
// Update old view for seamless relative teleport
|
||||||
|
void R_RelativeTeleportViewInterpolation(UINT8 p, fixed_t xdiff, fixed_t ydiff, fixed_t zdiff, angle_t angdiff);
|
||||||
// Set the current view context (the viewvars pointed to by newview)
|
// Set the current view context (the viewvars pointed to by newview)
|
||||||
void R_SetViewContext(enum viewcontext_e _viewcontext);
|
void R_SetViewContext(enum viewcontext_e _viewcontext);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue