Merge pull request #15168 from jameyboor/3.3.5

Core/Creature: Fix Creature::UpdateMovementFlags() ignoring DynamicTree height

Fix Creature::UpdateMovementFlags() checking only maps/vmaps height and skipping GameObject height stored in DynamicTree
This commit is contained in:
jackpoz
2015-07-28 19:54:49 +02:00

View File

@@ -2553,7 +2553,7 @@ void Creature::UpdateMovementFlags()
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(GetPositionX(), GetPositionY(), GetPositionZMinusOffset());
float ground = GetMap()->GetHeight(GetPhaseMask(), GetPositionX(), GetPositionY(), GetPositionZMinusOffset());
bool isInAir = (G3D::fuzzyGt(GetPositionZMinusOffset(), ground + 0.05f) || G3D::fuzzyLt(GetPositionZMinusOffset(), ground - 0.05f)); // Can be underground too, prevent the falling