summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-27 01:47:21 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-27 01:47:21 +0300
commitf82f0c049c8484de401cdc724d44f1dc48b0c648 (patch)
tree6959519df1ee300f916980ea9697297307dad83e /src
parent8e3641061a44cd9a78ff32b7840ee2f866ed8206 (diff)
downloadplus-f82f0c049c8484de401cdc724d44f1dc48b0c648.tar.gz
plus-f82f0c049c8484de401cdc724d44f1dc48b0c648.tar.bz2
plus-f82f0c049c8484de401cdc724d44f1dc48b0c648.tar.xz
plus-f82f0c049c8484de401cdc724d44f1dc48b0c648.zip
Fix building walk path.
Diffstat (limited to 'src')
-rw-r--r--src/resources/map/location.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resources/map/location.h b/src/resources/map/location.h
index cf44cfe37..d53b4cbf0 100644
--- a/src/resources/map/location.h
+++ b/src/resources/map/location.h
@@ -40,6 +40,7 @@ struct Location final
MetaTile *const ptile) :
x(px),
y(py),
+ tileCost(ptile->Fcost),
tile(ptile)
{}
@@ -50,10 +51,11 @@ struct Location final
*/
bool operator< (const Location &loc) const
{
- return tile->Fcost > loc.tile->Fcost;
+ return tileCost > loc.tileCost;
}
int x, y;
+ int tileCost;
MetaTile *tile;
};