aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/sound
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-12 23:06:13 -0500
committerPaul Gilbert2017-02-12 23:06:13 -0500
commit59d6feb9f89be24ffe27d24cc07c463dc7bfded0 (patch)
treee1780461e9e44534957236d21d5e9d5554fc0b8f /engines/titanic/sound
parentada88fa0fe439de604e66579624450e49b53dcbb (diff)
downloadscummvm-rg350-59d6feb9f89be24ffe27d24cc07c463dc7bfded0.tar.gz
scummvm-rg350-59d6feb9f89be24ffe27d24cc07c463dc7bfded0.tar.bz2
scummvm-rg350-59d6feb9f89be24ffe27d24cc07c463dc7bfded0.zip
TITANIC: Fix threshold testing for instrument animations
Diffstat (limited to 'engines/titanic/sound')
-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]];