aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-01-21 22:32:53 +0100
committerEugene Sandulenko2018-01-31 19:17:35 +0100
commit9c910b9000f1c943f745a9479434bd7e0c0bb11d (patch)
tree524b6e19ae597be5f94b0a35582addbe841c396f
parent979ae76ec1c32dfdbccab5a39c5a99953cb73524 (diff)
downloadscummvm-rg350-9c910b9000f1c943f745a9479434bd7e0c0bb11d.tar.gz
scummvm-rg350-9c910b9000f1c943f745a9479434bd7e0c0bb11d.tar.bz2
scummvm-rg350-9c910b9000f1c943f745a9479434bd7e0c0bb11d.zip
TUCKER: Fix dentist music in mall being played incorrectly
-rw-r--r--engines/tucker/locations.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp
index 5131b85896..0c31b98792 100644
--- a/engines/tucker/locations.cpp
+++ b/engines/tucker/locations.cpp
@@ -711,12 +711,12 @@ void TuckerEngine::execData3PreUpdate_locationNum9() {
if (_flagsTable[7] < 2) {
_flagsTable[7] = 2;
}
- if (_flagsTable[8] == 0 && _locationMusicsTable[0]._volume != 0) {
- _locationMusicsTable[0]._volume = 0;
- } else {
- _locationMusicsTable[0]._volume = _xPosCurrent / 40;
- }
+
+ // If the door to the dentist is open play the dentist room music based on
+ // Bud's proximity to the door (the closer the louder the music is played)
+ _locationMusicsTable[0]._volume = _flagsTable[8] == 0 ? 0 : _xPosCurrent / 40;
setVolumeMusic(0, _locationMusicsTable[0]._volume);
+
if (!isSoundPlaying(1) && getRandomNumber() > 32000) {
int i = getRandomNumber() / 5500 + 3;
assert(i >= 0 && i < kLocationSoundsTableSize);