Browse Source

Fixed disable of sounds for sound aliases of interval sounds.

pull/231/head
Simon Eisenmann 10 years ago
parent
commit
e855eff47a
  1. 10
      static/js/services/playsound.js

10
static/js/services/playsound.js

@ -119,14 +119,12 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) { @@ -119,14 +119,12 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) {
return null;
}
var id = this.getId(name);
if (interval) {
if (this.intervals.hasOwnProperty(id)) {
return this.intervals[id];
if (this.intervals.hasOwnProperty(name)) {
return this.intervals[name];
}
var i = this.intervals[id] = new SoundInterval(this, id, interval);
var i = this.intervals[name] = new SoundInterval(this, name, interval);
if (autostart) {
i.start();
}
@ -134,6 +132,8 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) { @@ -134,6 +132,8 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) {
} else {
var id = this.getId(name);
if (!this.shouldPlaySound(name) || !this.shouldPlaySound(id)) {
return;
}

Loading…
Cancel
Save