diff options
author | Filippos Karapetis | 2012-10-22 13:17:57 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-10-22 13:17:57 +0300 |
commit | e7d4f88a57efc354cceb34e69acada84600c693d (patch) | |
tree | 2ee087035ba5717ec24416e18ba3cdf6a3d4e4ee /engines/sci | |
parent | 1286710248730db63149169c8e482f633fa9ccad (diff) | |
download | scummvm-rg350-e7d4f88a57efc354cceb34e69acada84600c693d.tar.gz scummvm-rg350-e7d4f88a57efc354cceb34e69acada84600c693d.tar.bz2 scummvm-rg350-e7d4f88a57efc354cceb34e69acada84600c693d.zip |
SCI: Add a workaround for bug #3568452 - "SCI: QFG1VGA - Path finding bug in the forest"
This workaround has been added for now to stop the game from freezing.
A more correct solution would be to match our pathfinding algorithm
to what SSCI is doing, but with this workaround we can stop the more
immediate problem (game freezing) now.
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 4061795f82..b839ac51c3 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1366,7 +1366,16 @@ static void AStar(PathfindingState *s) { // other, while we apply a penalty to paths traversing it. // This difference might lead to problems, but none are // known at the time of writing. - if (s->pointOnScreenBorder(vertex->v)) + + // WORKAROUND: This check fails in QFG1VGA, room 81 (bug report #3568452). + // However, it is needed in other SCI1.1 games, such as LB2. Therefore, we + // add this workaround for that scene in QFG1VGA, until our algorithm matches + // better what SSCI is doing. With this workaround, QFG1VGA no longer freezes + // in that scene. + bool qfg1VgaWorkaround = (g_sci->getGameId() == GID_QFG1VGA && + g_sci->getEngineState()->currentRoomNumber() == 81); + + if (s->pointOnScreenBorder(vertex->v) && !qfg1VgaWorkaround) new_dist += 10000; if (new_dist < vertex->costG) { |