crashy fix

This commit is contained in:
2022-04-23 23:11:09 +03:00
parent 5a834d269c
commit 5dfe6bd585

View File

@@ -151,6 +151,7 @@ namespace Game
await Task.Delay((int)(randomDelay * 1000f));
//FlaxEngine.Scripting.RunOnUpdate(() =>
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
if (actor) // Engine might have cleaned up the actor
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, Vector2.One);
}
@@ -166,6 +167,7 @@ namespace Game
await Task.Delay((int)(randomDelay * 1000f));
//FlaxEngine.Scripting.RunOnUpdate(() =>
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
if (actor) // Engine might have cleaned up the actor
PlaySound(soundName, actor, channel, AudioFlags.None, position, volume, pitchRange);
}
@@ -180,6 +182,7 @@ namespace Game
await Task.Delay((int)(randomDelay * 1000f));
//FlaxEngine.Scripting.RunOnUpdate(() =>
// PlaySound(soundName, actor, channel, flags, position, volume, pitchRange));
if (actor) // Engine might have cleaned up the actor
PlaySound(soundName, actor, channel, flags, position, volume, pitchRange);
}