mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-22 01:39:57 +00:00
WINTERMUTE: Don't scroll as fast as the scripts actually ask for.
This commit is contained in:
parent
e829a57762
commit
a1a6354687
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user