mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-software-splitscreen-tilt' into 'master'
Fix splitscreen camera tilting in Software See merge request KartKrew/Kart!531
This commit is contained in:
commit
484ab4b5dc
3 changed files with 10 additions and 1 deletions
|
|
@ -293,6 +293,8 @@ static void D_Display(void)
|
||||||
{
|
{
|
||||||
for (i = 0; i <= r_splitscreen; ++i)
|
for (i = 0; i <= r_splitscreen; ++i)
|
||||||
{
|
{
|
||||||
|
R_SetViewContext(VIEWCONTEXT_PLAYER1 + i);
|
||||||
|
R_InterpolateViewRollAngle(rendertimefrac);
|
||||||
R_CheckViewMorph(i);
|
R_CheckViewMorph(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,11 @@ static void R_SetupFreelook(player_t *player, boolean skybox)
|
||||||
|
|
||||||
#undef AIMINGTODY
|
#undef AIMINGTODY
|
||||||
|
|
||||||
|
void R_InterpolateViewRollAngle(fixed_t frac)
|
||||||
|
{
|
||||||
|
viewroll = oldview->roll + R_LerpAngle(oldview->roll, newview->roll, frac);
|
||||||
|
}
|
||||||
|
|
||||||
void R_InterpolateView(fixed_t frac)
|
void R_InterpolateView(fixed_t frac)
|
||||||
{
|
{
|
||||||
if (frac < 0)
|
if (frac < 0)
|
||||||
|
|
@ -95,7 +100,7 @@ void R_InterpolateView(fixed_t frac)
|
||||||
|
|
||||||
viewangle = oldview->angle + R_LerpAngle(oldview->angle, newview->angle, frac);
|
viewangle = oldview->angle + R_LerpAngle(oldview->angle, newview->angle, frac);
|
||||||
aimingangle = oldview->aim + R_LerpAngle(oldview->aim, newview->aim, frac);
|
aimingangle = oldview->aim + R_LerpAngle(oldview->aim, newview->aim, frac);
|
||||||
viewroll = oldview->roll + R_LerpAngle(oldview->roll, newview->roll, frac);
|
R_InterpolateViewRollAngle(frac);
|
||||||
|
|
||||||
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
|
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
|
||||||
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
|
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ extern viewvars_t *newview;
|
||||||
|
|
||||||
// Interpolates the current view variables (r_state.h) against the selected view context in R_SetViewContext
|
// Interpolates the current view variables (r_state.h) against the selected view context in R_SetViewContext
|
||||||
void R_InterpolateView(fixed_t frac);
|
void R_InterpolateView(fixed_t frac);
|
||||||
|
// Special function just for software
|
||||||
|
void R_InterpolateViewRollAngle(fixed_t frac);
|
||||||
// Buffer the current new views into the old views. Call once after each real tic.
|
// Buffer the current new views into the old views. Call once after each real tic.
|
||||||
void R_UpdateViewInterpolation(void);
|
void R_UpdateViewInterpolation(void);
|
||||||
// Set the current view context (the viewvars pointed to by newview)
|
// Set the current view context (the viewvars pointed to by newview)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue