Core/Maps: fixed a floating point issue when retrieving minHeight values from GridMap

This commit is contained in:
jackpoz authored and Ovahlord committed 2021-07-06 20:51:19 +02:00
1 parent c926327077
commit 5a08b65cef
2 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -2271,7 +2271,7 @@ float GridMap::getMinHeight(float x, float y) const
if (!_minHeightPlanes)
return -500.0f;
GridCoord gridCoord = Trinity::ComputeGridCoord(x, y);
GridCoord gridCoord = Trinity::ComputeGridCoordSimple(x, y);
int32 doubleGridX = int32(std::floor(-(x - MAP_HALFSIZE) / CENTER_GRID_OFFSET));
int32 doubleGridY = int32(std::floor(-(y - MAP_HALFSIZE) / CENTER_GRID_OFFSET));