summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/objects.js b/objects.js
index 317a96a..fda06f6 100644
--- a/objects.js
+++ b/objects.js
@@ -2637,9 +2637,9 @@ SpriteMorph.prototype.playSound = function (name) {
SpriteMorph.prototype.doSetVolume = function (val) {
var myself = this;
- myself.volume = val;
+ myself.volume = Math.min(Math.max(0, val), 100);
myself.activeSounds.forEach(function (snd) {
- snd.volume = Math.min(Math.max(0, myself.volume), 100) / 100; // 'audio' objects
+ snd.volume = myself.volume / 100; // 'audio' objects
});
};