summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-12-07 11:53:57 +0100
committerGubolin <gubolin@fantasymail.de>2014-12-07 11:53:57 +0100
commit52f7082353f28395a0fd6952dc5a8765ace0fe9e (patch)
tree01cdf30deaad9786c9faedb850195b0d7eab5397 /threads.js
parent278c72442a914255602ef5beb9ebdb716e6fae4c (diff)
parent83e9ec28d5106ecd347453cf1020d3ca2be1b063 (diff)
downloadsnap-52f7082353f28395a0fd6952dc5a8765ace0fe9e.tar.gz
snap-52f7082353f28395a0fd6952dc5a8765ace0fe9e.zip
Merge remote-tracking branch 'origin/issue_461' into development
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/threads.js b/threads.js
index 5726af3..936c9e0 100644
--- a/threads.js
+++ b/threads.js
@@ -1810,15 +1810,18 @@ Process.prototype.blockReceiver = function () {
Process.prototype.doPlaySoundUntilDone = function (name) {
var sprite = this.homeContext.receiver;
- if (this.context.activeAudio === null) {
- this.context.activeAudio = sprite.playSound(name);
- }
- if (this.context.activeAudio.ended
- || this.context.activeAudio.terminated) {
- return null;
+
+ if (name !== '') {
+ if (this.context.activeAudio === null) {
+ this.context.activeAudio = sprite.playSound(name);
+ }
+ if (this.context.activeAudio.ended
+ || this.context.activeAudio.terminated) {
+ return null;
+ }
+ this.pushContext('doYield');
+ this.pushContext();
}
- this.pushContext('doYield');
- this.pushContext();
};
Process.prototype.doStopAllSounds = function () {