diff options
author | Vladimir Menshakov | 2010-01-03 01:57:05 +0000 |
---|---|---|
committer | Vladimir Menshakov | 2010-01-03 01:57:05 +0000 |
commit | 2fc79f197f5e0f6c336a26067334896ae321016e (patch) | |
tree | 36df9a3d6e751dfbbbe3efbc1e3853d1d82c6c36 /engines/teenagent | |
parent | 0b92bf472a7e67dfa9069d2564bfdb199c957553 (diff) | |
download | scummvm-rg350-2fc79f197f5e0f6c336a26067334896ae321016e.tar.gz scummvm-rg350-2fc79f197f5e0f6c336a26067334896ae321016e.tar.bz2 scummvm-rg350-2fc79f197f5e0f6c336a26067334896ae321016e.zip |
improved accuracy of the speed calculations
svn-id: r46914
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/scene.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index 48840bb06f..5cf7f03ccc 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -672,15 +672,12 @@ bool Scene::render() { uint zoom = lookupZoom(position.y); if (!path.empty()) { - int speed_x = 4 * zoom / 256, speed_y = 1 * zoom / 256; + int speed_x = ((teenagent.currentIndex() % 5) == 0? 16: 4) * zoom / 256, speed_y = 1 * zoom / 256; if (speed_x == 0) speed_x = 1; if (speed_y == 0) speed_y = 1; - if ((teenagent.currentIndex() % 5) == 0) - speed_x *= 4; - const Common::Point &destination = path.front(); Common::Point dp(destination.x - position.x, destination.y - position.y); |