beatrun icon indicating copy to clipboard operation
beatrun copied to clipboard

[Bug] FOV issues with some weapons and HL2 zoom

Open LostTrackpad opened this issue 10 months ago • 4 comments

Describe the bug FOV behavior appears to not work right with some zoom types (?) after #159 and some subsequent related commits.

To Reproduce Steps to reproduce the behavior:

  1. Launch the game and start any map with the Beatrun gamemode
  2. Equip the Camera weapon (Spawnmenu -> Weapons -> Other)
  3. Try and zoom in (RMB + move your mouse forwards). Notice that it won't zoom in.

Expected behavior The Camera weapon should be able to zoom in.

Screenshots/Videos Top is idle standing state, middle is aiming down sights, bottom is aiming down sights with patched FOV behavior. Not aiming down sights at proper 120 FOV. Aiming down sights. Still keeping non-ADS FOV and glitches out viewmodel. Aiming down sights with the FOV behavior patched to work as it should. Notice how it zooms to ~90 FOV and the viewmodel no longer glitches out.

Additional information:

  • Game Version: x86-64, latest update as of April 4th 2024.
  • Game Type: Both singleplayer and multiplayer.

Additional context Beatrun FOV was set to 120, though I don't think this is relevant.

Weapon used in screenshots is a TFA Base weapon.

LostTrackpad avatar Apr 04 '24 06:04 LostTrackpad

Okay I figured it out: The Camera weapon (and some weapon bases that use a similar zoom in method, and the HL2 zoom) tries to set CalcView() FOV but since we're setting it to 120 constantly, it can't, and so...this bug happens.

LostTrackpad avatar Apr 04 '24 06:04 LostTrackpad

Oops, accidentally closed the issue.

LostTrackpad avatar Apr 04 '24 06:04 LostTrackpad

HL2's zoom was never intended to work

JonnyBro avatar Apr 04 '24 15:04 JonnyBro

HL2's zoom was never intended to work

Okay well maybe not the HL2 zoom, but anything else that (apparently to me anyway) uses the same zoom method.

(Would mean that the HL2 zoom has to be completely disabled while keeping everything else working somehow though...)

LostTrackpad avatar Apr 05 '24 10:04 LostTrackpad

I'll take a look into this on weekends. I think I'll just disable HL2's zoom.

JonnyBro avatar May 29 '24 05:05 JonnyBro

~Note: I can't even test this right now, GMod keeps crashing for some reason (on x86-64 branch). Maybe I'll try the 32-bit executables and the normal branch, but not much hope.~

HL2 zoom is already disabled in Beatrun normally, it just somehow started working when I tried to fix this (Lua refresh being weird I suppose).

Also another thing I forgot after finding out about it ~2 weeks ago: ARC9 weapons need special handling in the fix because switching away from them causes your FOV to jerk back to fov_desired's value again* (for example, 120 (beatrun_fov) > 100 (my fov_desired))

It's like 9PM as I write this over here, I'll correct this later if I figure anything out.

*The current FOV behavior in Beatrun, hilariously, actually fixes this!

LostTrackpad avatar May 29 '24 14:05 LostTrackpad

@JonnyBro I think you can unpin this issue now. In case you forgot.

LostTrackpad avatar Jun 08 '24 13:06 LostTrackpad

Oh yea, thanks

JonnyBro avatar Jun 08 '24 13:06 JonnyBro