diff options
author | Einar Johan Trøan Sømåen | 2013-01-24 16:12:35 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-01-24 16:12:35 +0100 |
commit | a1a63546879927c6316165f86dfe61dfb13cb376 (patch) | |
tree | 78d99d71c60ebb5cea4cbf47c0036d67069009b5 /engines/wintermute | |
parent | e829a57762d60623264fa51c52f2f9aceb3b972f (diff) | |
download | scummvm-rg350-a1a63546879927c6316165f86dfe61dfb13cb376.tar.gz scummvm-rg350-a1a63546879927c6316165f86dfe61dfb13cb376.tar.bz2 scummvm-rg350-a1a63546879927c6316165f86dfe61dfb13cb376.zip |
WINTERMUTE: Don't scroll as fast as the scripts actually ask for.
Diffstat (limited to 'engines/wintermute')
-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; |