From f96aab2186d17ddd286fa42913f3f14e9562c4eb Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Sun, 21 Feb 2021 17:29:09 +0100 Subject: 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) --- src/server/game/Maps/Map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/Maps') 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(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; -- cgit v1.2.3