aboutsummaryrefslogtreecommitdiff
path: root/engines/touche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/touche')
-rw-r--r--engines/touche/touche.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 7b70b4a9ee..ff4f41f44d 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -3114,12 +3114,12 @@ void ToucheEngine::buildWalkPath(int dstPosX, int dstPosY, int keyChar) {
for (uint i = 0; i < _programWalkTable.size(); ++i) {
const ProgramWalkData *pwd = &_programWalkTable[i];
if ((pwd->point1 & 0x4000) == 0) {
- int distance = 32000;
ProgramPointData *pts1 = &_programPointsTable[pwd->point1];
ProgramPointData *pts2 = &_programPointsTable[pwd->point2];
if (pts1->order != 0) {
int dx = pts2->x - pts1->x;
int dy = pts2->y - pts1->y;
+ int distance = 32000;
if (dx == 0) {
if (dstPosY > MIN(pts2->y, pts1->y) && dstPosY < MAX(pts2->y, pts1->y)) {
int d = ABS(dstPosX - pts1->x);