aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-12 18:08:51 -0500
committerPaul Gilbert2017-02-12 18:08:51 -0500
commit2c8d72afd70d9cb40daafec5d3b2947ba33fe2e2 (patch)
tree0c8ed96e940c3ce40a76370fa4c37c818d925e9d /engines/titanic
parent104b3f39d38ab98b750e35311cea81d1b2b1a93a (diff)
downloadscummvm-rg350-2c8d72afd70d9cb40daafec5d3b2947ba33fe2e2.tar.gz
scummvm-rg350-2c8d72afd70d9cb40daafec5d3b2947ba33fe2e2.tar.bz2
scummvm-rg350-2c8d72afd70d9cb40daafec5d3b2947ba33fe2e2.zip
TITANIC: Fix ticks change check in updateInstruments
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/sound/music_room_handler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp
index b5adbae6e6..df2bc54dec 100644
--- a/engines/titanic/sound/music_room_handler.cpp
+++ b/engines/titanic/sound/music_room_handler.cpp
@@ -243,7 +243,7 @@ void CMusicRoomHandler::updateInstruments() {
instrument = (MusicInstrument)((int)instrument + 1)) {
MusicRoomInstrument &ins1 = _array1[instrument];
MusicRoomInstrument &ins2 = _array2[instrument];
- CMusicRoomInstrument *musicWave = _instruments[instrument];
+ CMusicRoomInstrument *ins = _instruments[instrument];
// Is this about checking playback position?
if (_position[instrument] < 0 || ins1._muteControl || _position[instrument] >= _musicObjs[instrument]->size()) {
@@ -254,7 +254,7 @@ void CMusicRoomHandler::updateInstruments() {
uint ticks = g_vm->_events->getTicksCount() - _soundStartTicks;
double val = (double)ticks * 0.001 - 0.6;
- if (val >= musicWave->_floatVal) {
+ if (val >= (ins->_floatVal - _array5[instrument])) {
_array5[instrument] += fn3(instrument, _position[instrument]);
const CValuePair &vp = (*_musicObjs[instrument])[_position[instrument]];