Blockland Welcome, Guest. Please login or register.
Did you miss your activation email?
December 12, 2017, 04:11:48 AM

Home Help Login Register
+  Blockland Forum
|-+  Blockland Forums
| |-+  Modification Help
| | |-+  Fov Switches to 90 when equipping old Gcat special weapons
Pages: [1]
Author Topic: Fov Switches to 90 when equipping old Gcat special weapons  (Read 304 times)
HALO3cheif

« December 06, 2017, 09:21:39 PM »

I notice this issue a lot when I use Gcats Special Weapons. I have tried to incorporate the FOV set feature from the Dweps package, however it simply breaks the addon and it fails to show in game. I am not experienced at all in scripting, and I have found this to be a major pet peeve when using since I use 100 FOV instead of the default 90. I could change the FOV number in the basic.cs file, however I worry that it would set the client FOV to 100 instead of their preferred setting.

Is there a way around this issue? Or could a scripter give me a few pointers?
Logged
Ad Bot

Full members do not see ads

Latte

« December 06, 2017, 10:06:04 PM »

There's no way to know what a client's preferred FOV is unless you make them type a command or something.
Logged
Headcrab Zombie

« December 06, 2017, 10:31:01 PM »

There's no way to know what a client's preferred FOV is unless you make them type a command or something.
You can get their current FOV, which as long as you retrieve before changing it, would presumably be their preferred FOV
Logged
Latte

« December 06, 2017, 10:47:32 PM »

You can get their current FOV, which as long as you retrieve before changing it, would presumably be their preferred FOV
Huh, you're right. Why do all those add-ons spam that "type /fixfov" shit then?
Logged
Conan

« December 06, 2017, 11:56:02 PM »

Huh, you're right. Why do all those add-ons spam that "type /fixfov" shit then?
most were created prior to that function bein added in
Logged
Ipquarx

« December 06, 2017, 11:56:29 PM »

Huh, you're right. Why do all those add-ons spam that "type /fixfov" shit then?
I mean, there's nothing wrong with having that. Specifically because sometimes the getfov function fails. But it fails relatively little, so that should be used as a backup, not the main means.
Logged
Rally

« December 07, 2017, 04:46:38 AM »

In my experience the getFOV function almost always fails, returning 90 no matter what. I got the best results by getting the clients FOV 1 second after they spawned in
Logged
Tendon

« December 07, 2017, 08:57:12 AM »

In my experience the getFOV function almost always fails, returning 90 no matter what. I got the best results by getting the clients FOV 1 second after they spawned in
That's been my experience as well.  That value isn't set until after the client has spawned and loaded in.  On older laggier computers it may take even longer than 1 second for the value to be set. :c
Logged
Rally

« December 07, 2017, 09:30:58 AM »

From what I can tell the value also seems to reset back to 90 after the client's player dies, or at-least some amount of time after the client has spawned
Logged
Conan

« December 07, 2017, 10:45:55 AM »

you have to call it on the object the client is currently controlling - otherwise it always returns 90. the best method in general is to capture the FOV the client had right before "scoping in" and then restoring it to that value when unscoping/on death.
Logged
HALO3cheif

« December 07, 2017, 10:55:01 AM »

you have to call it on the object the client is currently controlling - otherwise it always returns 90. the best method in general is to capture the FOV the client had right before "scoping in" and then restoring it to that value when unscoping/on death.

Makes sense, but how do I go about reworking the script to include that function? Again, I'm not experience in scripting, and I am not sure how to manipulate the code to accept that getFov function.
Logged
Rally

« December 07, 2017, 11:44:46 AM »

you have to call it on the object the client is currently controlling - otherwise it always returns 90. the best method in general is to capture the FOV the client had right before "scoping in" and then restoring it to that value when unscoping/on death.

Oh so I'm supposed to be calling it on the player?
Logged
Conan

« December 07, 2017, 12:33:05 PM »

Oh so I'm supposed to be calling it on the player?
iirc yes, and if they're in camera then the camera, not the player. not 100% sure but like 80% sure, cause i recall running into this problem a while back and finding out that that was the fix.
Logged
Pages: [1]  


Login with username, password and session length

Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Page created in 0.029 seconds with 19 queries.