mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 19:31:05 +00:00
Forgot to account for z axis -- thanks James R
This commit is contained in:
parent
656879b90b
commit
bcd0b04488
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue