mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 20:01:04 +00:00
reset cam interpolation on P_ResetCamera
This commit is contained in:
parent
a3bc32f7a0
commit
ca5884cf5e
3 changed files with 22 additions and 0 deletions
|
@ -86,6 +86,7 @@ typedef struct camera_s
|
|||
// Camera demobjerization
|
||||
// Info for drawing: position.
|
||||
fixed_t x, y, z;
|
||||
boolean reset;
|
||||
|
||||
//More drawing info: to determine current sprite.
|
||||
angle_t angle; // orientation
|
||||
|
|
|
@ -7392,6 +7392,7 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
|
|||
thiscam->x = x;
|
||||
thiscam->y = y;
|
||||
thiscam->z = z;
|
||||
thiscam->reset = true;
|
||||
|
||||
if (!(thiscam == &camera[0] && (cv_cam_still.value || cv_analog.value))
|
||||
&& !(thiscam == &camera[1] && (cv_cam2_still.value || cv_analog2.value))
|
||||
|
|
20
src/r_main.c
20
src/r_main.c
|
@ -1045,24 +1045,44 @@ void R_SetupFrame(player_t *player, boolean skybox)
|
|||
thiscam = &camera[3];
|
||||
chasecam = (cv_chasecam4.value != 0);
|
||||
R_SetViewContext(VIEWCONTEXT_PLAYER4);
|
||||
if (thiscam->reset)
|
||||
{
|
||||
R_ResetViewInterpolation(4);
|
||||
thiscam->reset = false;
|
||||
}
|
||||
}
|
||||
else if (splitscreen > 1 && player == &players[displayplayers[2]])
|
||||
{
|
||||
thiscam = &camera[2];
|
||||
chasecam = (cv_chasecam3.value != 0);
|
||||
R_SetViewContext(VIEWCONTEXT_PLAYER3);
|
||||
if (thiscam->reset)
|
||||
{
|
||||
R_ResetViewInterpolation(3);
|
||||
thiscam->reset = false;
|
||||
}
|
||||
}
|
||||
else if (splitscreen && player == &players[displayplayers[1]])
|
||||
{
|
||||
thiscam = &camera[1];
|
||||
chasecam = (cv_chasecam2.value != 0);
|
||||
R_SetViewContext(VIEWCONTEXT_PLAYER2);
|
||||
if (thiscam->reset)
|
||||
{
|
||||
R_ResetViewInterpolation(2);
|
||||
thiscam->reset = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
thiscam = &camera[0];
|
||||
chasecam = (cv_chasecam.value != 0);
|
||||
R_SetViewContext(VIEWCONTEXT_PLAYER1);
|
||||
if (thiscam->reset)
|
||||
{
|
||||
R_ResetViewInterpolation(1);
|
||||
thiscam->reset = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (player->spectator) // no spectator chasecam
|
||||
|
|
Loading…
Reference in a new issue