aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2021-02-21 17:29:09 +0100
committerGitHub <noreply@github.com>2021-02-21 17:29:09 +0100
commitf96aab2186d17ddd286fa42913f3f14e9562c4eb (patch)
treee06d165e7d1101c4521ffbda346efd1b147b9aee /src/server/game/Maps/Map.cpp
parent69916138bdb61444c53acb059987e7b058bc175e (diff)
Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z (#26092)
Use a fixed offset 0.5f instead of full collision height when retrieving floor Z as a full collision height ended up on the floor above a few times. It makes more sense to cast the ray just a bit higher up than using a full collision height (which by default is 2.0f)
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 77b4de4a5e1..e3289f08642 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2457,7 +2457,7 @@ float Map::GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, fl
if (const_cast<Map*>(this)->GetGrid(x, y))
{
// we need ground level (including grid height version) for proper return water level in point
- float ground_z = GetHeight(phasemask, x, y, z + collisionHeight, true, 50.0f);
+ float ground_z = GetHeight(phasemask, x, y, z + Z_OFFSET_FIND_HEIGHT, true, 50.0f);
if (ground)
*ground = ground_z;