Make signpost camera distance consistent in analog mode & don't target signpost in 2D mode

This commit is contained in:
lachwright 2019-12-05 12:58:44 +08:00
parent fdf3944f60
commit 28fbdab3d4
1 changed files with 8 additions and 9 deletions

View File

@ -9682,7 +9682,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (player->exiting)
{
if (mo->target && mo->target->type == MT_SIGN && mo->target->spawnpoint
&& !(gametype == GT_COOP && (netgame || multiplayer) && cv_exitmove.value))
&& !(gametype == GT_COOP && (netgame || multiplayer) && cv_exitmove.value)
&& !(twodlevel || (mo->flags2 & MF2_TWOD)))
sign = mo->target;
else if ((player->powers[pw_carry] == CR_NIGHTSMODE)
&& !(player->mo->state >= &states[S_PLAY_NIGHTS_TRANS1]
@ -9888,18 +9889,16 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
camheight = FixedMul(camheight, 3*FRACUNIT/2);
}
// x1.2 dist for analog
if (P_AnalogMove(player))
{
dist = FixedMul(dist, 6*FRACUNIT/5);
camheight = FixedMul(camheight, 6*FRACUNIT/5);
}
if (sign)
if (sign) // signpost camera has specific placement
{
camheight = mo->scale << 7;
camspeed = FRACUNIT/12;
}
else if (P_AnalogMove(player)) // x1.2 dist for analog
{
dist = FixedMul(dist, 6*FRACUNIT/5);
camheight = FixedMul(camheight, 6*FRACUNIT/5);
}
if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->powers[pw_carry] == CR_ROPEHANG || player->powers[pw_carry] == CR_GENERIC || player->powers[pw_carry] == CR_MACESPIN))
dist <<= 1;