Browse Source

Fixed disable of sounds for sound aliases of interval sounds.

pull/231/head
Simon Eisenmann 11 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) {
return null; return null;
} }
var id = this.getId(name);
if (interval) { if (interval) {
if (this.intervals.hasOwnProperty(id)) { if (this.intervals.hasOwnProperty(name)) {
return this.intervals[id]; 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) { if (autostart) {
i.start(); i.start();
} }
@ -134,6 +132,8 @@ define(['underscore', 'Howler', 'require'], function(_, Howler, require) {
} else { } else {
var id = this.getId(name);
if (!this.shouldPlaySound(name) || !this.shouldPlaySound(id)) { if (!this.shouldPlaySound(name) || !this.shouldPlaySound(id)) {
return; return;
} }

Loading…
Cancel
Save