From 71f70158e77201bdc42d3393fa11f78fe4e98ce0 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 19 Feb 2013 00:52:48 +0100 Subject: HOPKINS: Fix repeating route from pathfinder Regression from d7c8fe912. --- engines/hopkins/lines.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 3a7bc99f08..26419cd16b 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -1474,17 +1474,19 @@ RouteItem *LinesManager::PARCOURS2(int fromX, int fromY, int destX, int destY) { } } } - if (!loopCond) { - int v89 = PARC_PERS(v119, v118, clipDestX, clipDestY, v117, v121, v112); - if (v89 == 1) - return &super_parcours[0]; - if (v89 == 2 || MIRACLE(v119, v118, v117, v121, v112)) { - v115 = NV_LIGNEDEP; - v114 = NV_LIGNEOFS; - v112 = NV_POSI; - loopCond = true; - break; - } + + if (loopCond) + break; + + int v89 = PARC_PERS(v119, v118, clipDestX, clipDestY, v117, v121, v112); + if (v89 == 1) + return &super_parcours[0]; + if (v89 == 2 || MIRACLE(v119, v118, v117, v121, v112)) { + v115 = NV_LIGNEDEP; + v114 = NV_LIGNEOFS; + v112 = NV_POSI; + loopCond = true; + break; } } -- cgit v1.2.3