mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-31 07:40:34 +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) {
|
if (this.autoUpdateAudioPosition) {
|
||||||
this.updateAudioPosition();
|
this.updateAudioPosition();
|
||||||
}
|
}
|
||||||
|
if (this.sounds[index].downloaded) {
|
||||||
Audio.playSound(this.sounds[index], this.audioOptions);
|
Audio.playSound(this.sounds[index], this.audioOptions);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print("[ERROR] libraries/soundArray.js:play() : Index " + index + " out of range.");
|
print("[ERROR] libraries/soundArray.js:play() : Index " + index + " out of range.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue