TUCKER: Fix dentist music in mall being played incorrectly

This commit is contained in:
Adrian Frühwirth 2018-01-21 22:32:53 +01:00 committed by Eugene Sandulenko
parent 979ae76ec1
commit 9c910b9000

View File

@ -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);