mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:23:36 +02:00
check if sounds are downloaded before play thanks @Atlante45
This commit is contained in:
parent
96b3114a36
commit
d10f37291b
1 changed files with 3 additions and 1 deletions
|
@ -20,7 +20,9 @@ SoundArray = function(audioOptions, autoUpdateAudioPosition) {
|
|||
if (this.autoUpdateAudioPosition) {
|
||||
this.updateAudioPosition();
|
||||
}
|
||||
Audio.playSound(this.sounds[index], this.audioOptions);
|
||||
if (this.sounds[index].downloaded) {
|
||||
Audio.playSound(this.sounds[index], this.audioOptions);
|
||||
}
|
||||
} else {
|
||||
print("[ERROR] libraries/soundArray.js:play() : Index " + index + " out of range.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue