diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-28 00:08:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-28 00:08:04 +0300 |
commit | 0c35f03188f4cc7c5b8b681168b5f7545af004db (patch) | |
tree | 3582886b94afc96d40ee8d5f4fdc3c02187f36e1 /src | |
parent | 9e39e785fe069500b45d81d1ad081db6d58b0eb6 (diff) | |
download | manaplus-0c35f03188f4cc7c5b8b681168b5f7545af004db.tar.gz manaplus-0c35f03188f4cc7c5b8b681168b5f7545af004db.tar.bz2 manaplus-0c35f03188f4cc7c5b8b681168b5f7545af004db.tar.xz manaplus-0c35f03188f4cc7c5b8b681168b5f7545af004db.zip |
Fix implicit cast in map.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/map/map.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 810791222..adda1bcb7 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -1009,7 +1009,8 @@ Path Map::findPath(const int startX, const int startY, forbidden here. */ const int dx1 = std::abs(x - destX); newTile->Hcost = std::abs(dx1 - dy1) * basicCost + - std::min(dx1, dy1) * (basicCostF); + CAST_S32(static_cast<float>(std::min(dx1, dy1)) * + (basicCostF)); // Set the current tile as the parent of the new tile newTile->parentX = curr.x; |