mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-15 00:37:09 +00:00
end roll state only on server
This commit is contained in:
parent
f10c52b902
commit
209cb1e08e
1 changed files with 15 additions and 11 deletions
|
@ -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>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue