diff options
author | Willem Jan Palenstijn | 2013-02-16 22:29:58 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-02-18 23:52:27 +0100 |
commit | 6df59334b8998e25abdc46a2dfc718635f5a24df (patch) | |
tree | ae8d94bcb59f2e7171b195c10c8342ca77ce8279 /engines/hopkins/lines.cpp | |
parent | 5ca0cc8fcd5d9cb92fff64b3b4071f6d8272ee60 (diff) | |
download | scummvm-rg350-6df59334b8998e25abdc46a2dfc718635f5a24df.tar.gz scummvm-rg350-6df59334b8998e25abdc46a2dfc718635f5a24df.tar.bz2 scummvm-rg350-6df59334b8998e25abdc46a2dfc718635f5a24df.zip |
HOPKINS: Fix route direction
This fixes pathfinding to the top right in some situations.
Diffstat (limited to 'engines/hopkins/lines.cpp')
-rw-r--r-- | engines/hopkins/lines.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 99a2a422f0..3334a76757 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -1754,8 +1754,7 @@ int LinesManager::PARC_PERS(int fromX, int fromY, int destX, int destY, int a5, } } if (v22 == 1) { - // CHECKME: Overlapping intervals - if (v100 >= -1 && v100 <= 510) + if (v100 >= -1000 && v100 <= -510) newDirection = 2; if (v100 >= -510 && v100 <= 0) newDirection = 3; @@ -1769,21 +1768,20 @@ int LinesManager::PARC_PERS(int fromX, int fromY, int destX, int destY, int a5, newDirection = 4; if (v102 >= 0 && v102 <= 510) newDirection = 5; - // CHECKME: The two conditions on v102 are not compatible! - if (v102 >= -1 && v102 <= -510) - newDirection = 6; if (v102 >= -510 && v102 <= 0) newDirection = 5; + if (v102 >= -1000 && v102 <= -510) + newDirection = 6; } if (v22 == -1) { if (v100 >= 510 && v100 <= 1000) newDirection = 6; if (v100 >= 0 && v100 <= 510) newDirection = 7; - if (v100 >= -1000 && v100 <= -510) - newDirection = 8; if (v100 >= -510 && v100 <= 0) newDirection = 7; + if (v100 >= -1000 && v100 <= -510) + newDirection = 8; } if (v96 == -1) { if (v102 >= -1000 && v102 <= -510) |