aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamieson Christian2003-06-01 19:16:34 +0000
committerJamieson Christian2003-06-01 19:16:34 +0000
commit26076b8841493ff174a3c71c2b153df0c8626966 (patch)
treea08e3f5ab6f23f697a8f40580628b65c68733ea6
parent42f6d1058164fc02c51949ad78ab183745dfbbe0 (diff)
downloadscummvm-rg350-26076b8841493ff174a3c71c2b153df0c8626966.tar.gz
scummvm-rg350-26076b8841493ff174a3c71c2b153df0c8626966.tar.bz2
scummvm-rg350-26076b8841493ff174a3c71c2b153df0c8626966.zip
Hack to fix odd usage of the ParameterFader
in S&M around the dinosaurs. svn-id: r8251
-rw-r--r--scumm/imuse_player.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/scumm/imuse_player.cpp b/scumm/imuse_player.cpp
index d3ddf111a8..0fa2272a60 100644
--- a/scumm/imuse_player.cpp
+++ b/scumm/imuse_player.cpp
@@ -982,6 +982,16 @@ int Player::addParameterFader (int param, int target, int time) {
switch (param) {
case ParameterFader::pfVolume:
+ // HACK: If volume is set to 0 with 0 time,
+ // set it so immediately but DON'T clear
+ // the player. This fixes a problem with
+ // music being cleared inappropriately
+ // in S&M when playing with the Dinosaur.
+ if (!target && !time) {
+ setVolume (0);
+ return 0;
+ }
+
// Volume fades are handled differently.
start = _volume;
break;