mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Cleaned up and shorted the code for R_SetFOV.
This commit is contained in:
parent
30966ef951
commit
541fac8c6b
1 changed files with 5 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue