mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 16:27:19 +00:00
...
This commit is contained in:
parent
8bf6157183
commit
371e5348a6
2 changed files with 9 additions and 14 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue