Skip to content

Commit 8fb4797

Browse files
gunslingermodXottab-DUTY
authored andcommitted
[Bugfix] Incorrect zoom after attaching 'custom' scope to the weapon
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.
1 parent f2d6cb8 commit 8fb4797

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/xrGame/WeaponMagazined.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,7 @@ void CWeaponMagazined::InitAddons()
969969
READ_IF_EXISTS(pSettings, r_bool, GetScopeName(), "scope_dynamic_zoom", FALSE);
970970
m_zoom_params.m_sUseBinocularVision =
971971
READ_IF_EXISTS(pSettings, r_string, GetScopeName(), "scope_alive_detector", 0);
972+
m_fRTZoomFactor = m_zoom_params.m_fScopeZoomFactor;
972973
if (m_UIScope)
973974
{
974975
xr_delete(m_UIScope);

0 commit comments

Comments
 (0)