mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-21 08:51:10 +00:00
uncapped: Reset cam interpolation on P_ResetCamera
This commit is contained in:
parent
41f17495c4
commit
f43839ef8d
3 changed files with 21 additions and 0 deletions
|
@ -91,6 +91,7 @@ typedef struct camera_s
|
||||||
// Camera demobjerization
|
// Camera demobjerization
|
||||||
// Info for drawing: position.
|
// Info for drawing: position.
|
||||||
fixed_t x, y, z;
|
fixed_t x, y, z;
|
||||||
|
boolean reset;
|
||||||
|
|
||||||
//More drawing info: to determine current sprite.
|
//More drawing info: to determine current sprite.
|
||||||
angle_t angle; // orientation
|
angle_t angle; // orientation
|
||||||
|
|
|
@ -9656,6 +9656,7 @@ void P_ResetCamera(player_t *player, camera_t *thiscam)
|
||||||
thiscam->x = x;
|
thiscam->x = x;
|
||||||
thiscam->y = y;
|
thiscam->y = y;
|
||||||
thiscam->z = z;
|
thiscam->z = z;
|
||||||
|
thiscam->reset = true;
|
||||||
|
|
||||||
if ((thiscam == &camera && G_ControlStyle(1) == CS_SIMPLE)
|
if ((thiscam == &camera && G_ControlStyle(1) == CS_SIMPLE)
|
||||||
|| (thiscam == &camera2 && G_ControlStyle(2) == CS_SIMPLE))
|
|| (thiscam == &camera2 && G_ControlStyle(2) == CS_SIMPLE))
|
||||||
|
|
19
src/r_main.c
19
src/r_main.c
|
@ -1346,12 +1346,31 @@ void R_SkyboxFrame(player_t *player)
|
||||||
|
|
||||||
boolean R_ViewpointHasChasecam(player_t *player)
|
boolean R_ViewpointHasChasecam(player_t *player)
|
||||||
{
|
{
|
||||||
|
camera_t *thiscam;
|
||||||
boolean chasecam = false;
|
boolean chasecam = false;
|
||||||
|
|
||||||
if (splitscreen && player == &players[secondarydisplayplayer] && player != &players[consoleplayer])
|
if (splitscreen && player == &players[secondarydisplayplayer] && player != &players[consoleplayer])
|
||||||
|
{
|
||||||
|
thiscam = &camera2;
|
||||||
chasecam = (cv_chasecam2.value != 0);
|
chasecam = (cv_chasecam2.value != 0);
|
||||||
|
R_SetViewContext(VIEWCONTEXT_PLAYER2);
|
||||||
|
if (thiscam->reset)
|
||||||
|
{
|
||||||
|
R_ResetViewInterpolation(2);
|
||||||
|
thiscam->reset = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
thiscam = &camera;
|
||||||
chasecam = (cv_chasecam.value != 0);
|
chasecam = (cv_chasecam.value != 0);
|
||||||
|
R_SetViewContext(VIEWCONTEXT_PLAYER1);
|
||||||
|
if (thiscam->reset)
|
||||||
|
{
|
||||||
|
R_ResetViewInterpolation(1);
|
||||||
|
thiscam->reset = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (player->climbing || (player->powers[pw_carry] == CR_NIGHTSMODE) || player->playerstate == PST_DEAD || gamestate == GS_TITLESCREEN || tutorialmode)
|
if (player->climbing || (player->powers[pw_carry] == CR_NIGHTSMODE) || player->playerstate == PST_DEAD || gamestate == GS_TITLESCREEN || tutorialmode)
|
||||||
chasecam = true; // force chasecam on
|
chasecam = true; // force chasecam on
|
||||||
|
|
Loading…
Reference in a new issue