do under-aim detection only on server

This commit is contained in:
in0finite 2022-05-06 12:32:39 +02:00
parent 7c661aef6d
commit 3997d581e6

View file

@ -262,7 +262,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
this.UpdateAimAnim (state);
// do this right after UpdateAimAnim(), because that's the state when weapon conducts attack
if (Time.time - m_timeWhenDidUnderAimDetection >= PedManager.Instance.timeIntervalToUpdateUnderAimStatus)
if (m_isServer && Time.time - m_timeWhenDidUnderAimDetection >= PedManager.Instance.timeIntervalToUpdateUnderAimStatus)
{
m_timeWhenDidUnderAimDetection = Time.time;
UpdateUnderAimDetection(m_ped);