Fix the FOV issues with Bows, Sprinting and Spyglasses. #4045
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#4045
Loading…
Reference in New Issue
No description provided.
Delete Branch "Fix-FOV"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tell us about your pull request! Reference related issues, if necessary
Create FOV Modifier API.
Make Bows work with the API.
Make Spyglasses work with the API.
Make sprinting work with the API.
Testing
Tell us how to test your changes!
Get a bow, some arrows and a spyglass.
Test Spyglass by using it. Should zoom in, and zoom out.
Test Sprinting by, well, sprinting. Should zoom out, and back in.
Test Bows by charging the bow, and firing an arrow. The FOV should zoom in, and reset back to the current FOV. Also test bows while sprinting.
Expected behavior:
Spyglasses override the FOV setting it to 8, regardless of other FOV modifiers. Sprinting increases the FOV, and should reset back to the default FOV when done. (In the latest master, Sprinting overrides the FOV and stays zoomed out, after "zooming in".) Bows zoom in while charging / held charged and zoom back out to normal when fired / released. Bows also zoom in while sprinting, but have the sprint's FOV as it's basis for the zoom. Ie., the zoom while sprinting is noticeably less than when standing still. All FOV effects should reset back to the default FOV when no FOV modifiers are applied.
Will search and create the
fixes
later.dea5adcc23
to0f27869e10
really?! .... Redacted comment
8387c0e63c
toe5274b20db
WIP: Fix the FOV issues with Bows, Sprinting and Spyglasses.to Fix the FOV issues with Bows, Sprinting and Spyglasses.Using a
.
instead of a:
causes errors in other files... That the stack traceback doesn't state where the actual error is. It just gives a "... is a nil value" error.Also getting a lot of warnings from the
stone cutter
andburning storage
... (not sure though, if those have already been fixed?)New commits pushed, approval review dismissed automatically according to repository settings
Also, what do you think about making the Sprinting FOV be 1.25 instead of 1.1?
pls do that
Found a crash
Turned out the crash was my fault. Anyway, I pushed one more fix.
Now, regarding sprinting FOV: In my opinion 1.1 is good. It's subtle but visible even at 72 FOV (I normally use something like 120 FOV). 1.2 and higher factors is very visible, and while it looks OK for 72 FOV (even though very visible), it breaks down totally for higher FOV (like 120).
Ahh, I see. Well, the reason I suggested the higher amount, was to convey the feeling of speed. with the subtle amount, people unconsciously think that that they are going slower because it "feels like" they are. I've had others tell me that when they sprint in MCL they are going slower than when they sprint in MC. But, numerically, that's not the case. But, you really cannot tell how fast you are going in a game, because you don't have the peripheral vision like you do in real life.
Maybe something like a conditional based on the base FOV. The FOV is a setting in minetest, so we should be able to grab it. (Noting that the initial idea I had of using
.get_fov()
doesn't actually return the fov...)Fixes #3574
I want it to be set to 1.25 so it actually feels like you are running
I was killed by a slime and this happened
2023-12-12 15:31:37: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'mcl_fovapi' in callback on_respawnplayer(): ...test/games/mineclone2_pr/mods/PLAYER/mcl_fovapi/init.lua:214: attempt to call a nil value 2023-12-12 15:31:37: ERROR[Main]: stack traceback: 2023-12-12 15:31:37: ERROR[Main]: ...test/games/mineclone2_pr/mods/PLAYER/mcl_fovapi/init.lua:214: in function 'remove_all_modifiers' 2023-12-12 15:31:37: ERROR[Main]: ...test/games/mineclone2_pr/mods/PLAYER/mcl_fovapi/init.lua:69: in function <...test/games/mineclone2_pr/mods/PLAYER/mcl_fovapi/init.lua:68> 2023-12-12 15:31:37: ERROR[Main]: ...test.minetest/files/Minetest/builtin/common/register.lua:26: in function <...test.minetest/files/Minetest/builtin/common/register.lua:12>
New commits pushed, approval review dismissed automatically according to repository settings
Should be fixed now. As well as a bunch of other possible crashes.
2db2747dbd
to5926ca6915
Updated.
Missing: FOV change when using an Enderpearl or Chorus Fruit. Both of them reset the player's velocity when used. (So it cancels out sprinting, or is supposed to.)
5926ca6915
to8a5058e032
They don't reset velocity though. It's a different problem, we're done with this PR.
okay. I just saw it on another issue, while looking for "fixes #". cool. merging now.