summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-24 00:24:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-24 00:24:21 +0300
commit59f67ec52e74ee24e5898acd3a6bc17c3d1d36e5 (patch)
tree80f51dd78d554dbd3217fe090174b0c45b2fc5b6 /src
parent5e7e165bfdf4d0d726fd058b786519a04bcf62b0 (diff)
downloadplus-59f67ec52e74ee24e5898acd3a6bc17c3d1d36e5.tar.gz
plus-59f67ec52e74ee24e5898acd3a6bc17c3d1d36e5.tar.bz2
plus-59f67ec52e74ee24e5898acd3a6bc17c3d1d36e5.tar.xz
plus-59f67ec52e74ee24e5898acd3a6bc17c3d1d36e5.zip
Move one line in findpath map method.
Diffstat (limited to 'src')
-rw-r--r--src/map.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 211504504..2209cf997 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1383,9 +1383,6 @@ Path Map::findPath(int startX, int startY, int destX, int destY,
if (startX >= mWidth || startY >= mHeight)
return path;
- // Declare open list, a list with open tiles sorted on F cost
- std::priority_queue<Location> openList;
-
// Return when destination not walkable
if (!getWalk(destX, destY, walkmask))
return path;
@@ -1397,6 +1394,9 @@ Path Map::findPath(int startX, int startY, int destX, int destY,
startTile->Gcost = 0;
+ // Declare open list, a list with open tiles sorted on F cost
+ std::priority_queue<Location> openList;
+
// Add the start point to the open list
openList.push(Location(startX, startY, startTile));