diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-27 16:23:56 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-27 16:23:56 +0000 |
commit | bd0a58997677f4a73a2f5a3c5f4a30835d79c91b (patch) | |
tree | 7258fb4ecc29547e783159e70a2449950099c946 /src/map.cpp | |
parent | 23da8710e86683f4f9e09045b7790f0f3a983101 (diff) | |
download | manaserv-bd0a58997677f4a73a2f5a3c5f4a30835d79c91b.tar.gz manaserv-bd0a58997677f4a73a2f5a3c5f4a30835d79c91b.tar.bz2 manaserv-bd0a58997677f4a73a2f5a3c5f4a30835d79c91b.tar.xz manaserv-bd0a58997677f4a73a2f5a3c5f4a30835d79c91b.zip |
Introduced Point class to replace the confusing and clumsy usage of std::pair.
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp index 8a768e07..6487b700 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -41,7 +41,7 @@ Location::Location(int x, int y, MetaTile *tile): bool Location::operator< (const Location &loc) const { - return tile->Fcost > loc.tile->Fcost; + return tile->Fcost > loc.tile->Fcost; } @@ -281,9 +281,3 @@ Map::findPath(int startX, int startY, int destX, int destY) return path; } - -bool areAround(unsigned x1, unsigned y1, unsigned x2, unsigned y2) -{ - return (abs(x1 - x2) <= (int)AROUND_AREA && - abs(y1 - y2) <= (int)AROUND_AREA); -} |