From f82f0c049c8484de401cdc724d44f1dc48b0c648 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 27 Mar 2018 01:47:21 +0300 Subject: Fix building walk path. --- src/resources/map/location.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; }; -- cgit v1.2.3-70-g09d2