summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;
};