Skip to content

Commit

Permalink
[Bugfix] Incorrect zoom after attaching 'custom' scope to the weapon
Browse files Browse the repository at this point in the history
When you attaches 'custom' scope to the weapon which has just been spawned, you could find that initial zoom of the scope is completely incorrect.
The problem is that m_fRTZoomFactor field, which defines real currently used zoom, hasn't been updated after attaching scope.
  • Loading branch information
gunslingermod authored and Xottab-DUTY committed Aug 14, 2017
1 parent f2d6cb8 commit 8fb4797
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/xrGame/WeaponMagazined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ void CWeaponMagazined::InitAddons()
READ_IF_EXISTS(pSettings, r_bool, GetScopeName(), "scope_dynamic_zoom", FALSE);
m_zoom_params.m_sUseBinocularVision =
READ_IF_EXISTS(pSettings, r_string, GetScopeName(), "scope_alive_detector", 0);
m_fRTZoomFactor = m_zoom_params.m_fScopeZoomFactor;
if (m_UIScope)
{
xr_delete(m_UIScope);
Expand Down

0 comments on commit 8fb4797

Please sign in to comment.