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)
18261826 inherited::OnStateSwitch (S, oldState);
18271827 m_BriefInfo_CalcFrame = 0 ;
18281828
1829- if (GetState () == eReload)
1829+ if (S == eReload)
18301830 {
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 ))
18371835 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 ))
18461838 current_actor->Cameras ().AddCamEffector (new CEffectorDOF (m_zoom_params.m_ReloadDof ));
1847- }
1848- }
18491839 }
18501840}
18511841
You can’t perform that action at this time.
0 commit comments