mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +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)
|
if (viewactive)
|
||||||
{
|
{
|
||||||
DAngle fov = 90.f;
|
DAngle fov = 90.f;
|
||||||
if (players[consoleplayer].camera != nullptr)
|
AActor *cam = players[consoleplayer].camera;
|
||||||
|
if (cam)
|
||||||
{
|
{
|
||||||
if (players[consoleplayer].camera && players[consoleplayer].camera->player)
|
if (cam->player)
|
||||||
{
|
fov = cam->player->FOV;
|
||||||
fov = players[consoleplayer].camera->player->FOV;
|
else fov = cam->CameraFOV;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fov = players[consoleplayer].camera->CameraFOV;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
R_SetFOV(r_viewpoint, fov);
|
R_SetFOV(r_viewpoint, fov);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue