This commit is contained in:
in0finite 2022-01-04 19:00:08 +01:00
parent 8bf6157183
commit 371e5348a6
2 changed files with 9 additions and 14 deletions

View file

@ -263,14 +263,17 @@ namespace SanAndreasUnity.Behaviours
if (NetStatus.IsServer)
return;
if (string.IsNullOrEmpty(newSoundId.fileName))
F.RunExceptionSafe(() =>
{
if (_mouthAudioSource != null)
_mouthAudioSource.Stop();
return;
}
if (string.IsNullOrEmpty(newSoundId.fileName))
{
if (_mouthAudioSource != null)
_mouthAudioSource.Stop();
return;
}
this.PlaySoundFromPedMouth(newSoundId);
this.PlaySoundFromPedMouth(newSoundId);
});
}
}

View file

@ -24,14 +24,6 @@ namespace SanAndreasUnity.Behaviours.Peds.States
private float _timeToEmitSound;
/*public override void OnBecameActive()
{
base.OnBecameActive();
if (m_isServer)
this.TryEmitSound();
}*/
public override void UpdateState()
{
this.TryEmitSound();