aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorr00ty-tc <r00ty-tc@users.noreply.github.com>2016-02-26 22:02:20 +0000
committerDDuarte <dnpd.dd@gmail.com>2016-04-16 16:49:56 +0100
commitbf85d8d07f150830ca746e9126fbaad4aff45141 (patch)
tree7d0707ca6bd7957190afd9f86d578d27506b60e7 /src/server/game/Maps/Map.cpp
parentff3e176eb1da4139fb9e516b2433cdc404dc7a42 (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! (cherry picked from commit 10550fe8cff1fb91c8084b623fe243a6340ea52d)
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-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 520583c6121..cfb7288c43b 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2347,9 +2347,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