Forgot to account for z axis -- thanks James R

This commit is contained in:
James 2019-08-29 17:17:58 -04:00
parent 656879b90b
commit bcd0b04488
1 changed files with 2 additions and 2 deletions

View File

@ -11578,7 +11578,7 @@ void P_PlayerAfterThink(player_t *player)
if (splitscreen && player == &players[secondarydisplayplayer])
{
thiscam = &camera2;
if (P_AproxDistance(player->mo->x-thiscam->x-thiscam->momx, player->mo->y-thiscam->y-thiscam->momy) > ((player->speed+cv_cam2_dist.value)*2))
if ((P_AproxDistance(player->mo->x-thiscam->x-thiscam->momx, player->mo->y-thiscam->y-thiscam->momy) > ((player->speed+cv_cam2_dist.value)*2)) || (abs(thiscam->z - player->mo->z) > ((player->speed+cv_cam2_dist.value)*2)))
{
P_ResetCamera(player, thiscam);
}
@ -11586,7 +11586,7 @@ void P_PlayerAfterThink(player_t *player)
else if (player == &players[displayplayer])
{
thiscam = &camera;
if (P_AproxDistance(player->mo->x-thiscam->x-thiscam->momx, player->mo->y-thiscam->y-thiscam->momy) > ((player->speed+cv_cam_dist.value)*2))
if ((P_AproxDistance(player->mo->x-thiscam->x-thiscam->momx, player->mo->y-thiscam->y-thiscam->momy) > ((player->speed+cv_cam_dist.value)*2)) || (abs(thiscam->z - player->mo->z) > ((player->speed+cv_cam_dist.value)*2)))
{
P_ResetCamera(player, thiscam);
}