Cleaned up and shorted the code for R_SetFOV.

This commit is contained in:
nashmuhandes 2017-08-29 00:39:03 +08:00 committed by Rachael Alexanderson
parent 30966ef951
commit 541fac8c6b

View file

@ -685,16 +685,12 @@ void D_Display ()
if (viewactive)
{
DAngle fov = 90.f;
if (players[consoleplayer].camera != nullptr)
AActor *cam = players[consoleplayer].camera;
if (cam)
{
if (players[consoleplayer].camera && players[consoleplayer].camera->player)
{
fov = players[consoleplayer].camera->player->FOV;
}
else
{
fov = players[consoleplayer].camera->CameraFOV;
}
if (cam->player)
fov = cam->player->FOV;
else fov = cam->CameraFOV;
}
R_SetFOV(r_viewpoint, fov);
}