From af224be8bc8a49a657bb8f564cd70dccc9888a32 Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Sun, 3 Aug 2008 20:04:29 +0000 Subject: [PATCH] When iterating over neighbouring start tiles for a path, do not iterate from the end position of the path. Fixes bug in new multi-threaded path finding code. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5766 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/fpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fpath.c b/src/fpath.c index 10c5a6945..3cd38b048 100644 --- a/src/fpath.c +++ b/src/fpath.c @@ -523,8 +523,8 @@ FPATH_RETVAL fpathDroidRoute(DROID* psDroid, SDWORD tX, SDWORD tY) for (dir = 0; dir < NUM_DIR; dir++) { - int x = map_coord(tX) + aDirOffset[dir].x; - int y = map_coord(tY) + aDirOffset[dir].y; + int x = map_coord(psDroid->pos.x) + aDirOffset[dir].x; + int y = map_coord(psDroid->pos.y) + aDirOffset[dir].y; if (!fpathBlockingTile(x, y, psPropStats->propulsionType)) {