Visibility improvement

This commit is contained in:
lachwright 2020-03-10 19:30:02 +08:00
parent f0c98697dc
commit e2c95a0060

View file

@ -7786,9 +7786,17 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
dist = FixedHypot(f1, f2);
if (mo->eflags & MFE_VERTICALFLIP)
{
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
if (thiscam->pitch < ANGLE_180 && thiscam->pitch > angle)
angle = thiscam->pitch;
}
else
{
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
if (thiscam->pitch >= ANGLE_180 && thiscam->pitch < angle)
angle = thiscam->pitch;
}
if (player->playerstate != PST_DEAD && !((player->pflags & PF_NIGHTSMODE) && player->exiting))
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'