Support_DefaultFOV

Author Topic: Support_DefaultFOV  (Read 2452 times)

This add-on grabs the client's FOV shortly after they spawn.
It also contains support for add-ons that use /fixfov [FOV], and will automatically set your default fov when you first spawn.

If you are zoomed in while spawning, it will not get the correct value.
Please use /setdefaultfov [FOV] if this happens.


If you're making an add-on, and want to use this as support, the default fov is stored at:
[client].defaultFOV

You can either include defaultfov.cs with your add-on, or list Support_DefaultFOV as a required add-on.


Downloads:
Leopard: Support_DefaultFOV.zip
Glass: Support_DefaultFOV.zip
« Last Edit: January 14, 2018, 11:25:58 AM by Tendon »

Update 1.1.0
+ removed debug echo (whoops)
+ raised upper clamp to 360
+ added message for fovs lower than 75 or higher than 120 (the default limits)

To go a bit more into how it works:
Immediately after the client spawns for the first time, it sets the player object's FOV to 3.14
Once the client finishes loading and gains control over their player, the player's FOV is automatically updated(by the game engine) to the client's current FOV.

This mod runs a loop which checks if the player's FOV has changed from 3.14 to something else.
Once a change has been detected, the %client.defaultFOV value is set to the client's current FOV.

It also contains a little bit of code to provide compatibility with Gravity Cat's weapons, and supposedly, any add-on that uses /fixfov.
« Last Edit: January 11, 2018, 10:30:17 AM by Tendon »

To go a bit more into how it works:
Immediately after the client spawns for the first time, it sets the player object's FOV to 3.14
Once the client finishes loading and gains control over their player, the player's FOV is automatically updated(by the game engine) to the client's current FOV.

This mod runs a loop which checks if the player's FOV has changed from 3.14 to something else.
Once a change has been detected, the %client.defaultFOV value is set to the client's current FOV.

It also contains a little bit of code to provide compatibility with Gravity Cat's weapons, and supposedly, any add-on that uses /fixfov.

Glass: Support_DefaultFOV.zip awaiting approval...

You have to PM conan or one of them. Also it looks like it got approved so you can edit the OP.

so what exactly does this addon do? does it let players keep a consistent fov when on servers that use those stuffty fov-changing weapons (eg. gcat's realistic warfare)? or does it force joining clients to have a specific fov?

so what exactly does this addon do? does it let players keep a consistent fov when on servers that use those stuffty fov-changing weapons (eg. gcat's realistic warfare)? or does it force joining clients to have a specific fov?
you could try reading the op

Those old weapons made a mistake in how they set up the default FOV.

This add-on corrects some of those stuffty FOV changing weapons, and sets up a FOV for new weapons to use.

Those old weapons made a mistake in how they set up the default FOV.

This add-on corrects some of those stuffty FOV changing weapons, and sets up a FOV for new weapons to use.
thank you for the clarification.

you could try reading the op

It was a valid question even after reading the OP.