mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 23:05:30 +03:00
Fix viewmodel flip on zoom
The fabs() was incorrectly applied only to the viewmodel's FOV instead of the result of that subtracted by the FOV offset. Further it doesn't seem to make sense to use the absolute value of that subtraction; Yes, it does prevent flipping, but it will zoom out again as the FOV decreases. Instead just limit the result of the subtraction to non-negative numbers.
This commit is contained in:
parent
8bf258eb75
commit
b95c72eb3f
@ -745,7 +745,7 @@ void CViewRender::SetUpViews()
|
||||
|
||||
//Adjust the viewmodel's FOV to move with any FOV offsets on the viewer's end
|
||||
#ifdef MAPBASE
|
||||
view.fovViewmodel = fabs(g_pClientMode->GetViewModelFOV()) - flFOVOffset;
|
||||
view.fovViewmodel = max(0.001f, g_pClientMode->GetViewModelFOV() - flFOVOffset);
|
||||
#else
|
||||
view.fovViewmodel = g_pClientMode->GetViewModelFOV() - flFOVOffset;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user