File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -1826,26 +1826,16 @@ void CWeapon::OnStateSwitch(u32 S, u32 oldState)
1826
1826
inherited::OnStateSwitch (S, oldState);
1827
1827
m_BriefInfo_CalcFrame = 0 ;
1828
1828
1829
- if (GetState () == eReload)
1829
+ if (S == eReload)
1830
1830
{
1831
- if (iAmmoElapsed == 0 )
1832
- {
1833
- if (H_Parent () == Level ().CurrentEntity () && !fsimilar (m_zoom_params.m_ReloadEmptyDof .w , -1 .0f ))
1834
- {
1835
- CActor* current_actor = smart_cast<CActor*>(H_Parent ());
1836
- if (current_actor)
1831
+ CActor* current_actor = smart_cast<CActor*>(H_Parent ());
1832
+ if (current_actor && H_Parent () == Level ().CurrentEntity ())
1833
+ if (iAmmoElapsed == 0 )
1834
+ if (!fsimilar (m_zoom_params.m_ReloadEmptyDof .w , -1 .0f ))
1837
1835
current_actor->Cameras ().AddCamEffector (new CEffectorDOF (m_zoom_params.m_ReloadEmptyDof ));
1838
- }
1839
- }
1840
- else
1841
- {
1842
- if (H_Parent () == Level ().CurrentEntity () && !fsimilar (m_zoom_params.m_ReloadDof .w , -1 .0f ))
1843
- {
1844
- CActor* current_actor = smart_cast<CActor*>(H_Parent ());
1845
- if (current_actor)
1836
+ else
1837
+ if (!fsimilar (m_zoom_params.m_ReloadDof .w , -1 .0f ))
1846
1838
current_actor->Cameras ().AddCamEffector (new CEffectorDOF (m_zoom_params.m_ReloadDof ));
1847
- }
1848
- }
1849
1839
}
1850
1840
}
1851
1841
You can’t perform that action at this time.
0 commit comments