aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/sound/music_room_handler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp
index fca1fd5460..76d7043d0c 100644
--- a/engines/titanic/sound/music_room_handler.cpp
+++ b/engines/titanic/sound/music_room_handler.cpp
@@ -253,8 +253,9 @@ void CMusicRoomHandler::updateInstruments() {
uint ticks = g_vm->_events->getTicksCount() - _soundStartTicks;
double time = (double)ticks * 0.001 - 0.6;
+ double threshold = _animTime[instrument] - ins->_animTime;
- if (time >= (ins->_animTime - _animTime[instrument])) {
+ if (time >= threshold) {
_animTime[instrument] += getAnimDuration(instrument, _position[instrument]);
const CValuePair &vp = (*_songs[instrument])[_position[instrument]];