Join GitHub today
Expose player FOV to Lua API #7557
This PR aims to make the zoom feature more generic by allowing mods to individually override player FOVs with arbitrary values. Once this is merged, I'll work on making builtin zoom use these methods instead. Here are the changes:
Here's a mod to test out the new Lua API methods: fov_test
I agree, you may want to set a very narrow FOV for an effect but not want world 2000 nodes away being generated and/or loaded.
Just a gentle reminder: The PR is still WIP since the documentation hasn't been updated yet, but the actual code is complete. I can start working on the documentation only when the code has been approved, and nothing needs to be majorly modified. :)
@ Script API
@ Client / Audiovisuals
Jul 16, 2018
referenced this pull request
Sep 30, 2018
#5797 would be the best solution, but considering that the feature would need SSCSM to actually be useful... Hm, looks like the need for server-sent FOV has already been expressed here #5797 (comment)
To clarify, this won't add to lag in any significant way, as the server only sends
The feature freeze for 5.0.0 seems to be nearing. @SmallJoker you had expressed that a couple of codestyle issues required attention, which I clarified in my previous comment. Would you like anything else to be changed to make this PR merge-worthy? Should we discuss on overrides vs modifiers for player FOV? Unlike player physics, using modifiers here doesn't seem to be a good idea.
I did see that message, and I thought I'll fix it in a follow-up PR which would just fix code-style in a couple of files. But I understand that the touched code should follow the correct code-style, even if the rest of the file currently doesn't. Thanks for pointing that out :)