end roll state only on server

This commit is contained in:
in0finite 2019-07-08 01:41:46 +02:00
parent f10c52b902
commit 209cb1e08e

View file

@ -89,20 +89,24 @@ namespace SanAndreasUnity.Behaviours.Peds.States
if( !this.IsActiveState )
return;
// check if anim is finished
if( null == m_animState || !m_animState.enabled )
if (m_isServer)
{
// anim finished
// switch to other state
// check if anim is finished
// try to switch to crouch aim state
CrouchState.SwitchToAimState(m_ped);
if( !this.IsActiveState )
return;
if( null == m_animState || !m_animState.enabled )
{
// anim finished
// switch to other state
// try to switch to crouch aim state
CrouchState.SwitchToAimState(m_ped);
if( !this.IsActiveState )
return;
// switch to crouch state
m_ped.SwitchState<CrouchState>();
}
// switch to crouch state
m_ped.SwitchState<CrouchState>();
}
}