aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorr00ty-tc <r00ty-tc@users.noreply.github.com>2016-02-26 22:02:20 +0000
committerr00ty-tc <r00ty-tc@users.noreply.github.com>2016-02-26 22:02:20 +0000
commit10550fe8cff1fb91c8084b623fe243a6340ea52d (patch)
treeb68264cbf16954a460e1b4ad35b75eb8ca7e864d /src
parent1c86d286d4f9afc365a2a64b7ed0eb2d939814b7 (diff)
Solve many of the creature falling through floor issues.
This seems entirely wrong to discount the returned map height if we're already below it. In many cases this is exactly why we want the height!
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Maps/Map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index ccc599b6de8..5d2952a6a50 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2328,9 +2328,9 @@ float Map::GetHeight(float x, float y, float z, bool checkVMap /*= true*/, float
{
// we have mapheight and vmapheight and must select more appropriate
- // we are already under the surface or vmap height above map heigt
+ // vmap height above map height
// or if the distance of the vmap height is less the land height distance
- if (z < mapHeight || vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
+ if (vmapHeight > mapHeight || std::fabs(mapHeight - z) > std::fabs(vmapHeight - z))
return vmapHeight;
else
return mapHeight; // better use .map surface height