From caf310f4ab038bc6556c0af975e72abc28573f6e Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Tue, 6 Sep 2022 20:22:58 +0200 Subject: [PATCH] fix(Core/Maps): Fixed getting liquid data near depths. (#12814) --- src/server/game/Maps/Map.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 2113756da..b592f32dd 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1946,11 +1946,11 @@ inline LiquidData const GridMap::GetLiquidData(float x, float y, float z, float { // Get water level float liquid_level = _liquidMap ? _liquidMap[lx_int * _liquidWidth + ly_int] : _liquidLevel; - // Get ground level (sub 0.2 for fix some errors) + // Get ground level float ground_level = getHeight(x, y); - // Check water level and ground level - if (liquid_level >= ground_level && z >= ground_level) + // Check water level and ground level (sub 0.2 for fix some errors) + if (liquid_level >= ground_level && z >= ground_level - 0.2f) { // All ok in water -> store data liquidData.Entry = entry;