diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-03-27 01:47:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-03-27 01:47:21 +0300 |
commit | f82f0c049c8484de401cdc724d44f1dc48b0c648 (patch) | |
tree | 6959519df1ee300f916980ea9697297307dad83e | |
parent | 8e3641061a44cd9a78ff32b7840ee2f866ed8206 (diff) | |
download | manaplus-f82f0c049c8484de401cdc724d44f1dc48b0c648.tar.gz manaplus-f82f0c049c8484de401cdc724d44f1dc48b0c648.tar.bz2 manaplus-f82f0c049c8484de401cdc724d44f1dc48b0c648.tar.xz manaplus-f82f0c049c8484de401cdc724d44f1dc48b0c648.zip |
Fix building walk path.
-rw-r--r-- | src/resources/map/location.h | 4 |
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; }; |