id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Mod Coding => Topic started by: VGames on November 28, 2015, 06:29:57 PM

Title: Altering FOV when zoomed in
Post by: VGames on November 28, 2015, 06:29:57 PM
I've noticed that I am unable to make a weapon change the field of vision while zoomed in. It's like the command:

Code: [Select]
sys.setcvar( "g_fov", WHATEVERYOUWANTTHISTOBE );

does not work at all while zoomed in with the BUTTON_ZOOM key. Do any of you know where in the SDK this can be turned off so that I can change the FOV no matter if I'm currently zoomed in or not?
Title: Re: Altering FOV when zoomed in
Post by: The Happy Friar on November 29, 2015, 07:09:00 AM
There's a way to do it from the .def I think.  Can't remember what it is, I might of saw it in the code & used it.
Title: Re: Altering FOV when zoomed in
Post by: VGames on November 29, 2015, 09:53:56 AM
Are u saying there's a way to disable this issue in the def or are u referring to the zoomFov definition that u can add a weapons def to set the fov when zoomed in? I know about that one already.
Title: Re: Altering FOV when zoomed in
Post by: VGames on November 29, 2015, 03:37:49 PM
I've set this up with different buttons so I'm good to go now. Thanks for the help.
Title: Re: Altering FOV when zoomed in
Post by: The Happy Friar on November 30, 2015, 09:07:38 PM
I looked up in the GPL code.  using "zoomFOV" "#" (listed in weapon.h) in the weapon def should define a specific zoom per weapon.  But if you don't define for every weapon then when you zoom in with a weapon w/o zoom defined it uses the last value. 

IE the machine gun zooms in to 20.  You use machine gun & zoom in.  Then you switch to fists.  It has no zoom defined. If you zoom in then it zooms in to 20.
Title: Re: Altering FOV when zoomed in
Post by: VGames on November 30, 2015, 11:19:16 PM
That's good to know. Did not realize it worked like that. Thanks for the heads up.