diff options
author | Filippos Karapetis | 2010-07-28 23:30:59 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-28 23:30:59 +0000 |
commit | c099127c3dee1eddcb725415e2bf831674da87f3 (patch) | |
tree | 5b97dcee877faab65202e8864ea31d49f71e7643 | |
parent | b3230b26a1343afd55e310520208b6424c89e3ea (diff) | |
download | scummvm-rg350-c099127c3dee1eddcb725415e2bf831674da87f3.tar.gz scummvm-rg350-c099127c3dee1eddcb725415e2bf831674da87f3.tar.bz2 scummvm-rg350-c099127c3dee1eddcb725415e2bf831674da87f3.zip |
SCI: Break out instead of continuing when an end point is contained in multiple polygons, while running the avoidpath algorithm (or we'll end up in an infinite loop). Fixes bug #3036299 - "LB2CD: Game Hangs at Speakeasy"
svn-id: r51450
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 45a52694dc..2f96fd9f60 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -988,8 +988,13 @@ static Common::Point *fixup_end_point(PathfindingState *s, const Common::Point & if (cont != CONT_OUTSIDE) { if (s->_appendPoint != NULL) { // We shouldn't get here twice + // Happens in LB2CD, inside the speakeasy when walking from the + // speakeasy (room 310) into the bathroom (room 320), after having + // consulted the notebook (bug #3036299). + // We need to break in this case, otherwise we'll end in an infinite + // loop. warning("AvoidPath: end point is contained in multiple polygons"); - continue; + break; } // The original end position is in an invalid location, so we move the point |