diff options
-rw-r--r-- | engines/wintermute/ad/ad_scene.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp index 213d5564a8..526e0802cb 100644 --- a/engines/wintermute/ad/ad_scene.cpp +++ b/engines/wintermute/ad/ad_scene.cpp @@ -933,6 +933,10 @@ bool AdScene::traverseNodes(bool doUpdate) { // adjust horizontal scroll if (_gameRef->_timer - _lastTimeH >= _scrollTimeH) { int timesMissed = (_gameRef->_timer - _lastTimeH) / _scrollTimeH; + // Cap the amount of catch-up to avoid jittery characters. + if (timesMissed > 2) { + timesMissed = 2; + } _lastTimeH = _gameRef->_timer; if (_offsetLeft < _targetOffsetLeft) { _offsetLeft += _scrollPixelsH * timesMissed; @@ -946,6 +950,10 @@ bool AdScene::traverseNodes(bool doUpdate) { // adjust vertical scroll if (_gameRef->_timer - _lastTimeV >= _scrollTimeV) { int timesMissed = (_gameRef->_timer - _lastTimeV) / _scrollTimeV; + // Cap the amount of catch-up to avoid jittery characters. + if (timesMissed > 2) { + timesMissed = 2; + } _lastTimeV = _gameRef->_timer; if (_offsetTop < _targetOffsetTop) { _offsetTop += _scrollPixelsV * timesMissed; |