Core/Movement: Get zone/area IDs from vmap data in the liquid update

Port From (https://github.com/TrinityCore/TrinityCore/commit/51ce3b1c1dc6a53938ed6f240bac00681d18a44f)
This commit is contained in:
hondacrx
2020-07-23 18:22:46 -04:00
parent db44970987
commit 286a200178
10 changed files with 325 additions and 137 deletions
+1 -1
View File
@@ -2688,7 +2688,7 @@ namespace Game.Entities
return;
// Set the movement flags if the creature is in that mode. (Only fly if actually in air, only swim if in water, etc)
float ground = GetMap().GetHeight(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZMinusOffset());
float ground = GetFloorZ();
bool isInAir = (MathFunctions.fuzzyGt(GetPositionZMinusOffset(), ground + 0.05f) || MathFunctions.fuzzyLt(GetPositionZMinusOffset(), ground - 0.05f)); // Can be underground too, prevent the falling